Parking compartment recognition apparatus

ABSTRACT

To provide a parking space recognition apparatus that can reduce a processing load for detecting the parking space. The parking space recognition apparatus recognizes a parking space by using images generated by four cameras to be mounted on a vehicle. In the parking space recognition apparatus, an image acquisition part acquires the images generated by the cameras. A detection setter selects the cameras to be used for detecting the parking space from among the cameras based on a traveling state of the vehicle. A parking space detector acquires the images generated by the cameras selected by the detection setter from the image acquisition part, and detects the parking space from the acquired images.

BACKGROUND OF THE INVENTION Field of the Invention

The invention relates to a parking compartment recognition apparatusthat detects a parking position of a vehicle from an image captured by acamera mounted on the vehicle.

Description of the Background Art

In order to reduce a burden on a driver who parks the vehicle, a parkingassistance apparatus that detects the parking compartment to park thevehicle, and controls the vehicle to park within a range of the detectedparking compartment has been proposed.

For example, in Japanese published unexamined application No.2017-27405, a parking guidance apparatus that detects a vacant parkingcompartment from an image captured by a camera installed in a vehicle isdisclosed. When the parking guidance apparatus detects a parking signhaving a predetermined pattern from the image captured by the camera,the parking guidance apparatus determines that a host vehicle can beparked in the parking compartment with the detected parking sign.

In this way, the conventional parking assistance apparatus detects theparking compartment from each of four images captured by four camerasinstalled in a front, rear, left and right side of the vehicle. That is,in the parking assistance apparatus, there has been a problem that aprocessing load for detecting the parking compartment increases as anumber of the cameras increases.

SUMMARY OF THE INVENTION

According to one aspect of the invention, a parking space recognitionapparatus includes an image acquisition part, a detection setter, adetection area specifying part and a parking space detector. The imageacquisition part acquires a plurality of images generated by a pluralityof cameras provided on a vehicle including (i) a left side cameracapturing a left side view of the vehicle, (ii) a right side cameracapturing a right side view of the vehicle and (iii) a rear cameracapturing a rear view of the vehicle. The detection setter selects thecameras to be used for detecting the parking space from among theplurality of cameras based on a traveling state of the vehicle, andselects a detection mode for detecting the parking space from the imagesgenerated by the selected cameras from among a first mode and a secondmode based on the traveling state of the vehicle. The detection areaspecifying part specifies a first predetermined detection area in theimages generated by the selected cameras among the plurality of imagesacquired by the image acquisition part when the detection setter selectsthe first mode, and specifies a second detection area narrower than thefirst detection area in the images generated by the selected cameraswhen the detection setter selects the second mode. The parking spacedetector detects the parking space from the first detection areaspecified by the detection area specifying part with a first accuracywhen the detection setter selects the first mode, and detects theparking space from the second detection area specified by the detectionarea specifying part with a second accuracy when the detection setterselects the second mode.

As a result, since both the detection mode and the images to be used fordetecting the parking space are changed according to the traveling stateof the vehicle, a load for detecting the parking space can be reduced.

According to another aspect of the invention, the detection setterassigns the left side camera and the right side camera to the firstdetector and assigns the rear camera to the second detector. The firstdetector alternately repeats a process for detecting the parking spacefrom the images generated by the left side camera and the process fordetecting the parking space from the images generated by the right sidecamera. The second detector detects the parking space from the imagesgenerated by the rear camera.

Thus, since the left side camera and the right side camera are assignedto the first detector, and the rear camera is assigned to the seconddetector, the parking space located on a lateral and rear side of thevehicle can be detected in real time.

Therefore, an object of the invention is to provide a parking spacerecognition apparatus that can reduce a processing load for detectingthe parking space.

These and other objects, features, aspects and advantages of theinvention will become more apparent from the following detaileddescription of the invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional block diagram illustrating a configuration of aparking assistance system that includes a parking compartmentrecognition apparatus according to an embodiment;

FIG. 2 illustrates a world coordinate system that is set by the parkingcompartment recognition apparatus shown in FIG. 1;

FIG. 3 illustrates one example of parking compartments that arerecognized by the parking compartment recognition apparatus shown inFIG. 1;

FIG. 4 is a functional block diagram illustrating a configuration of theparking compartment recognition apparatus shown in FIG. 1;

FIG. 5 is a functional block diagram illustrating a configuration of aparking compartment detector shown in FIG. 4;

FIG. 6 illustrates one example of changing one or more camera(s) to beselected by the parking compartment recognition apparatus 1 shown inFIG. 1;

FIG. 7 illustrates one example of a detection area that is specified ina frame generated by the camera shown in FIG. 1;

FIG. 8 illustrates another example of detection areas that are specifiedin the frame generated by the camera shown in FIG. 1;

FIG. 9 is a flowchart illustrating an operation of the parkingcompartment recognition apparatus shown in FIG. 1;

FIG. 10 illustrates one example of a setting table that is stored in amemory shown in FIG. 4;

FIG. 11 is a partially enlarged diagram of a part of a parking lot;

FIG. 12 illustrates one example of the frame generated by a left sidecamera shown in FIG. 1;

FIG. 13 is a flowchart of a parking compartment detection process shownin FIG. 9;

FIG. 14 illustrates one example of edge lines that are generated by aborder-line detector shown in FIG. 5;

FIG. 15 illustrates one example of the parking compartments that aredetected by a compartment determiner shown in FIG. 5;

FIG. 16 illustrates one example of a compartment list shown in FIG. 4;

FIG. 17 is a flowchart of an updating process of the compartment listshown in FIG. 16;

FIG. 18 illustrates the detection areas based on a detailed mode that isspecified by a detection area specifying part;

FIG. 19 illustrates one example of a parking route of a vehicle shown inFIG. 2;

FIG. 20 illustrates another example of the parking route of the vehicleshown in FIG. 2;

FIG. 21 illustrates a modification of one of the parking compartmentshown in FIG. 3;

FIG. 22 illustrates another modification of the parking compartmentshown in FIG. 3; and

FIG. 23 illustrates another determination method of a parking referenceposition.

DESCRIPTION OF THE EMBODIMENTS

Embodiments of the invention will be hereinafter described in detailwith reference to accompanying drawings. In the drawings, the same andequivalent parts are designated by the same reference numerals andletters, and the description thereof will not be repeated.

[1. Configuration of Parking Assistance System 100]

[1.1 Overall Configuration]

FIG. 1 is a functional block diagram illustrating a configuration of aparking assistance system 100 that includes a parking compartmentrecognition apparatus 1 according to this embodiment. With reference toFIG. 1, the parking assistance system 100 is mounted on a vehicle, suchas an automobile. The parking assistance system 100 assists a driverwhen the driver parks the vehicle within a parking compartment. Adefinition of the parking compartment will be described later.

The parking assistance system 100 includes the parking compartmentrecognition apparatus 1, a vehicle controller 2, four cameras 3, adisplay 4, a distance measuring sensor 5 and a parking instructionswitch 6.

The parking compartment recognition apparatus 1 and the vehiclecontroller 2 are CAN (Controller Area Network) nodes and connected via abus 7. Although not shown in FIG. 1, the bus 7 is also connected to anECU (Electronic Control Unit) other than the parking compartmentrecognition apparatus 1 and the vehicle controller 2.

When the parking compartment recognition apparatus 1 detects the parkingcompartment from one or more frame (s) generated by the four cameras 3,the parking compartment recognition apparatus 1 informs the vehiclecontroller 2 of the detected parking compartment. When the parkingcompartment recognition apparatus 1 receives information of a desiredparking compartment from the vehicle controller 2, the parkingcompartment recognition apparatus 1 generates video data including thereceived information of the desired parking compartment. The parkingcompartment recognition apparatus 1 outputs the generated video data tothe display 4. The desired parking compartment is, as described later,the parking compartment selected by the driver.

The vehicle controller 2 selects the desired parking compartment fromthe parking compartments informed by the parking compartment recognitionapparatus 1 according to an operation of the driver. The vehiclecontroller 2 outputs the selected desired parking compartment to theparking compartment recognition apparatus 1. The vehicle controller 2assists a parking operation by the driver by controlling a front wheelsteering angle when moving the vehicle to the selected desired parkingcompartment.

Each of the cameras 3 includes a lens and an imaging element, andcaptures an image of surroundings of the vehicle. The cameras 3 includea front camera 3F, a rear camera 3B, a left side camera 3L and a rightside camera 3R. Each of the cameras 3 generates a moving image includinga plurality of frames, and supplies the generated moving image to theparking compartment recognition apparatus 1 in a frame unit.

The display 4 is, for example, a liquid crystal display. The display 4receives the video data from the parking compartment recognitionapparatus 1, and displays a video of surroundings of the vehicle basedon the received video data.

The distance measuring sensor 5 is, for example, an ultrasonic sonar. InFIG. 1, only one distance measuring sensor is shown, but in fact, theparking assistance system 100 includes a plurality of distance measuringsensors 5. The distance measuring sensor 5 is arranged on a side surfaceand a rear end surface of the vehicle. The distance measuring sensor 5detects a distance between the vehicle and an obstacle.

The parking instruction switch 6 is used when the driver instructs theparking assistance system 100 to start parking assistance.

[1.2 Definition of World Coordinate System]

FIG. 2 illustrates a world coordinate system that is set by the parkingcompartment recognition apparatus 1. With reference to FIG. 2, theparking assistance system 100 shown in FIG. 1 is mounted on a vehicle 9.In the world coordinate system, an origin Ow of the world coordinatesystem is a midpoint of a rear wheel rotating shaft of the vehicle 9.

An X axis extends in a straight traveling direction of the vehicle 9,and is a straight line passing through a center of gravity of thevehicle 9. A positive direction of the X axis is a direction from therear end surface toward a front end surface of the vehicle 9. A Y axisextends in a direction perpendicular to both the straight travelingdirection and a vertical direction of the vehicle 9, and corresponds tothe rear wheel rotating shaft of the vehicle 9. A positive direction ofthe Y axis is a direction from a left side surface toward a right sidesurface of the vehicle 9. That is, the origin Ow is the midpoint of therear wheel rotating shaft of the vehicle 9.

[1.3. Definition of Terms]

Terms used for describing the parking compartment recognition apparatus1 are hereinafter described. FIG. 3 illustrates one example of a parkinglot in which the parking compartments are set. Although a parkingcompartment L is actually in contact with a white line W, the parkingcompartment L is shown away from the white line W in FIG. 3 forconvenience of description. This applies to the figures other than FIG.3.

The parking compartment L more commonly called a “parking space” is anarea that is set to park the vehicle in the parking lot. The parkingcompartment recognition apparatus 1 recognizes the parking compartment Lregardless of whether or not the vehicle is parked. In this embodiment,the parking compartment L is a rectangle, and a long side of the parkingcompartment L is perpendicular to a traveling road A.

The white line W is a line to show a range of the parking compartment Lto the driver. In this embodiment, a case in which a compartment line iswhite will be described, but the compartment line does not have to bewhite.

A border line B is a longitudinal side of the white line W, andspecifies a width of the parking compartment L. The border line B is apart of the long side of the parking compartment L, and a part of thelong side of the white line W. That is, the border line B is a part ofan outline of each of the parking compartment L and the white line W. InFIG. 3, some of the border lines B are denoted by signs.

A parking reference position S is set as a guide for stopping thevehicle 9 when parking the vehicle 9 in one parking compartment L.Specifically, the parking reference position S is a position of theorigin Ow in a case where parking of the vehicle 9 in one parkingcompartment L has been completed. When the origin Ow corresponds to theparking reference position S, and the X axis of the world coordinatesystem described later corresponds to a center line of the parkingcompartment L, the parking assistance system 100 determines that aprocess for parking the vehicle 9 in the parking compartment L has beencompleted. The parking reference position S is set for each of theparking compartments L regardless of whether or not another vehicle isparked in the parking compartment L.

The parking compartment recognition apparatus 1 uses a parking referenceposition and a starting point of the border line B as parameters to showa position of the parking compartment L. The starting point of oneborder line B is an end point of two end points of one border line Bwhich is close to the traveling road A.

[1.4. Arrangement of Cameras 3]

With reference to FIG. 2, the front camera 3F is provided near aninstallation position of a license plate at a front end of the vehicle9, and an optical axis 3Fa of the front camera 3F is directed in thepositive direction of the X axis. The rear camera 3B is provided near aninstallation of a license plate at a rear end of the vehicle 9, and anoptical axis 3Ba of the rear camera 3B is directed in a negativedirection of the X axis. It is desirable that the installation positionsof the front camera 3F and the rear camera 3B are on the X axis, but maydeviate a little from the X axis.

The front camera 3F captures a front view of the vehicle 9 to generate afront frame 31F, and supplies the generated front frame 31F to theparking compartment recognition apparatus 1. The rear camera 3B capturesa rear view of the vehicle 9 to generate a rear frame 31B, and suppliesthe generated rear frame 31B to the parking compartment recognitionapparatus 1.

The left side camera 3L is provided on a left door mirror 93, and anoptical axis 3La of the left side camera 3L is directed in a negativedirection of the Y axis. The left side camera 3L captures a left sideview of the vehicle 9 to generate a left side frame 31L, and suppliesthe generated left side frame 31L to the parking compartment recognitionapparatus 1.

The right side camera 3R is provided on a right door mirror 93, and anoptical axis 3Ra of the right side camera 3R is directed in the positivedirection of the Y axis. The right side camera 3R captures a right sideview of the vehicle to generate a right side frame 31R, and supplies thegenerated right side frame 31R to the parking compartment recognitionapparatus 1.

The lens of each of the cameras 3 is a wide angle lens having an angleof view of 180° or more. Therefore, the parking assistance system 100 iscapable of capturing all surrounding images of the vehicle 9.

[1.5. Configuration of Parking Compartment Recognition Apparatus 1]

FIG. 4 is a functional block diagram illustrating a configuration of theparking compartment recognition apparatus 1 shown in FIG. 1. Withreference to FIG. 4, the parking compartment recognition apparatus 1includes an image acquisition part 11, a detection setter 12, adetection area specifying part 14, a parking compartment detector 15, adisplay controller 16 and a memory 17.

The image acquisition part 11 acquires the frame from each of thecameras 3. The image acquisition part 11 outputs the frame(s) capturedby one or more camera (s) selected by the detection setter 12 among theacquired frames to the parking compartment detector 15.

The detection setter 12 selects two cameras to be used for detecting theparking compartment L from the cameras 3 based on a traveling state ofthe vehicle 9. The traveling state includes, for example, a speed of thevehicle 9, a rotation angle of a steering wheel of the vehicle 9, atraveling direction of the vehicle 9, a position of the vehicle 9, andthe like. The traveling direction indicates whether the vehicle 9 movesforward or backward. The detection setter 12 informs the imageacquisition part 11 and the detection area specifying part 14 of theselected cameras.

The detection setter 12 determines a detection mode of the parkingcompartment detector 15 based on the traveling state of the vehicle 9.Specifically, the detection setter 12 determines one of a simple modeand a detailed mode to be the detection mode of the parking compartmentdetector 15. The detailed mode has a higher accuracy in detecting theparking compartment than the simple mode. When the simple mode isselected, the parking compartment L is detected in a wider range thanwhen the detailed mode is selected. Specifically, when the simple modeis selected, the detection area specifying part 14 specifies apredetermined detection area L in an area table 32, and the parkingcompartment detector 15 detects the parking compartment L from thespecified detection area. On the other hand, when the detailed mode isselected, the detection area specifying part 14 specifies a detectionarea based on the parking reference position S that has been alreadydetected. As a result, it is possible to determine the parking referenceposition S of the parking compartment L detected in the simple mode witha further higher accuracy. Details of the simple mode and the detailedmode will be described later.

The detection area specifying part 14 specifies the detection areas ofthe frames generated by the cameras selected by the detection setter 12.The detection area is determined based on the detection mode of theparking compartment detector 15.

When the detection mode is the simple mode, the parking compartmentdetector 15 detects the parking compartment L from the frames receivedfrom the image acquisition part 11 with a first accuracy. When thedetection mode is the detailed mode, the parking compartment detector 15detects the parking compartment L from the frames received from theimage acquisition part 11 with a second accuracy. Specifically, theparking compartment detector 15 detects the border line B from thedetection area specified by the detection area specifying part 14, anddetects the parking compartment L based on the detected border line B.The parking compartment detector 15 generates a compartment list 18 inwhich the detected parking compartment has been recorded, and outputsthe compartment list 18 to the vehicle controller 2.

When the vehicle 9 moves backward, the display controller 16 generates aparking assistance image including the rear frame 31B, and outputs thegenerated parking assistance image to the display 4. The displaycontroller 16 acquires the traveling direction of the vehicle 9, forexample, from a shift position sensor (not shown).

The memory 17 is a non-volatile storage device, and stores thecompartment list 18, a setting table 19 and the area table 32. Thecompartment list 18 records the parking compartment L detected by theparking compartment detector 15. The setting table 19 records thecameras and the detection mode that are used when detecting the parkingcompartment L. The area table 32 records the detection area that isspecified when the parking compartment detector 15 detects the parkingcompartment L in the simple mode.

The parking compartment recognition apparatus 1 selects at least onecamera from among the cameras 3 based on the traveling state of thevehicle 9, and detects the parking compartment L from the framesgenerated by at least one selected camera. As a result, the parkingcompartment recognition apparatus 1 can prevent detection accuracy ofthe parking compartment L from lowering, even when all the camerascannot be used for detecting the parking compartment L.

The parking compartment recognition apparatus 1 changes the detectionmode based on the traveling state of the vehicle 9. As a result, theparking compartment recognition apparatus 1 reduces a processing loadfor detecting the parking compartment L without lowering the detectionaccuracy of the parking compartment L when parking the vehicle 9.

[1.6. Configuration of Parking Compartment Detector 15]

FIG. 5 is a functional block diagram illustrating a configuration of theparking compartment detector 15 shown in FIG. 4. With reference to FIG.5, the parking compartment detector 15 includes a first detector 21 anda second detector 22.

The first detector 21 and the second detector 22 detect the parkingcompartment L from the frames. The first detector 21 and the seconddetector 22 are microcontrollers, and independently detect the parkingcompartment L, respectively. The first detector 21 and the seconddetector 22 may use an FPGA (Field Programmable Gate Array) that can beprogrammed after manufacturing an integrated circuit and areconfigurable processor that can reconfigure a connection and settingof a circuit cell inside the integrated circuit.

The first detector 21 detects the parking compartment from the framegenerated by one camera of two cameras selected by the detection setter12. The first detector 21 includes a border-line detector 211, acompartment determiner 212 and a position corrector 214.

The border-line detector 211 detects the border line B from the framegenerated by one camera, and outputs a position of the detected borderline B to the compartment determiner 212. The position of the borderline B is described in the world coordinate system, and includespositions of two end points of the border line B.

The compartment determiner 212 receives the position of the border lineB from the border-line detector 211, and determines the parkingcompartment L based on the received position of the border line B. Thecompartment determiner 212 outputs the position of the determinedparking compartment L to a list manager 213. The position of the parkingcompartment L is described in the world coordinate system, and includesthe parking reference position S and a position of the starting point ofeach of two border lines.

The list manager 213 updates the position of the parking compartmentthat is recorded in the compartment list 18 based on the position of theparking compartment L determined by the compartment determiner 212 and acompartment determiner 222.

The position corrector 214 corrects the position of the parkingcompartment L added to the compartment list 18 based on a moving amountof the vehicle 9 during a period between a generation time of the framesby the cameras 3 and a present time. Furthermore, the position corrector214 corrects the position of the parking compartment L that has beenalready recorded in the compartment list 18 based on the moving amountof the vehicle 9 during a period between a previous correction time andthe present time. The moving amount of the vehicle 9 is identified basedon the speed of the vehicle 9 and the rotation angle of the steeringwheel of the vehicle 9. The position corrector 214 stores thecompartment list 18 in which the position of the parking compartment Lhas been corrected in the memory 17, and outputs the compartment list 18to the vehicle controller 2.

The second detector 22 detects the parking compartment L from the framegenerated by the other camera of two cameras selected by the detectionsetter 12. The second detector 22 includes a border-line detector 221and the compartment determiner 222.

The border-line detector 221 detects the border line B from the framegenerated by the other camera. The compartment determiner 222 determinesthe parking compartment L based on the position of the border line Bdetected by the border-line detector 221, and outputs the position ofthe determined parking compartment L to the list manager 213.

In FIG. 5, a case in which the first detector 21 includes the listmanager 213 and the position corrector 214 has been described, but isnot limited thereto. The second detector 22 may include the list manager213 and the position corrector 214. In this case, the second detector 22updates the compartment list 18 and corrects the position of the parkingcompartment L recorded in the compartment list 18 instead of the firstdetector 21 when a load on the first detector 21 is higher than apredetermined threshold value.

[2. Operation Outline]

FIG. 6 illustrates changing the cameras to be used by the parkingcompartment recognition apparatus 1. With reference to FIG. 6, a case inwhich the vehicle 9 moves from a position Pa to a position Pb isassumed. FIG. 6 conveniently shows imaging areas 7L, 7R and 7B that canbe captured by each of the left side camera 3L, the right side camera 3Rand the rear camera 3B, and the imaging areas 7L, 7R and 7B are notactual imaging areas to be captured by these cameras.

The parking compartment recognition apparatus 1 switches the cameras tobe used for detecting the parking compartment L according to thetraveling state of the vehicle 9. For example, when the vehicle 9 movingforward and the speed of the vehicle 9 is 10 km/h at the position Pa,the parking compartment recognition apparatus 1 selects the left sidecamera 3L and the right side camera 3R, and detects the parkingcompartment L from the left side frame 31L and the right side frame 31R.When the vehicle 9 is moving forward and the speed of the vehicle 9 is10 km/h, there is a low possibility that the vehicle 9 immediatelystarts to perform a backward parking. The parking compartmentrecognition apparatus 1 uses the left side camera 3L and the right sidecamera 3R to detect the parking compartment L from a wide area on leftand right sides of the vehicle 9.

When the vehicle 9 is moving forward, the speed of the vehicle 9 is 2km/h and the steering wheel of the vehicle 9 is turned 250° clockwise atthe position Pb, the parking compartment recognition apparatus 1 usesthe left side camera 3L and the rear camera 3B to recognize the parkingcompartment L. In this case, there is a high possibility that thevehicle 9 moves backward after stopping, and moves into the parkingcompartment L that is located on a left rear side of the vehicle 9. Theparking compartment recognition apparatus 1 uses the left side camera 3Land the rear camera 3B to detect the parking compartment L from aleft-rear side area of the vehicle 9. That is, the parking compartmentrecognition apparatus 1 selects the cameras that capture an outside areaof a turning track of the vehicle 9 from among the cameras 3.

As described above, the parking compartment recognition apparatus 1selects the cameras to be used for detecting the parking compartment Laccording to the traveling state of the vehicle 9. As a result, theparking compartment recognition apparatus 1 reduces the processing loadfor detecting the parking compartment L. Furthermore, the parkingcompartment recognition apparatus 1 changes the images to be used fordetecting the parking compartment L according to the position of thevehicle 9, the speed of the vehicle 9, the rotation angle of thesteering wheel of the vehicle 9, the traveling direction of the vehicle9, and the like.

The parking compartment recognition apparatus 1 changes processingcontents of detecting the parking compartment L based on the travelingstate of the vehicle 9. Specifically, the parking compartmentrecognition apparatus 1 determines one of the simple mode and thedetailed mode to be the detection mode of the parking compartment. Theparking compartment recognition apparatus 1 detects the parkingcompartment L from the frames generated by the selected cameras in thedetermined detection mode.

The parking compartment recognition apparatus 1 specifies an area to bedetected for the parking compartment L. The detection areas to bespecified in the frames differ between the simple mode and the detailedmode.

FIG. 7 illustrates one example of the detection area that is specifiedin the left side frame 31L when the simple mode is set. With referenceto FIG. 7, when the simple mode is set, the parking compartmentrecognition apparatus 1 sets an area 31K in which a vehicle body of thevehicle 9 is not reflected in the left side frame 31L as the detectionarea.

FIG. 8 illustrates one example of the detection areas that are specifiedin the left side frame 31L when the detailed mode is set. With referenceto FIG. 8, when the detailed mode is set, the parking compartmentrecognition apparatus 1 sets a plurality of areas 31N in which each ofwhite lines W is assumed to appear in the left side frame 31L as thedetection areas. The areas 31N are specified based on past detectionresults of the parking compartment L.

That is, when the simple mode is selected, the parking compartment L isdetected in a wider range and more roughly than when the detailed modeis selected. When the simple mode is determined, the parking compartmentrecognition apparatus 1 can easily select a new parking compartment. Onthe other hand, when the detailed mode is selected, the parkingcompartment L is detected in a narrower range and with a higher accuracythan when the simple mode is selected. Therefore, a processing load onthe parking compartment recognition apparatus 1 is equal between thesimple mode and the detailed mode.

As described above, the parking compartment recognition apparatus 1 usesone of the simple mode and the detailed mode according to the travelingstate of the vehicle 9. As a result, it is possible to reduce theprocessing load without lowering detection performance of the parkingcompartment L.

[3. Operation of Parking Assistance System 100]

[3.1. Operation of Parking Compartment Recognition Apparatus 1]

FIG. 9 is a flowchart illustrating an operation when the parkingcompartment recognition apparatus 1 shown in FIG. 1 detects the parkingcompartment L. A process shown in FIG. 9 is started when the speed ofthe vehicle 9 is equal to or lower than a predetermined startingreference value. The starting reference value is, for example, 20 km/h.At a time point at which the process shown in FIG. 9 has been started,the cameras are not selected and the detection mode is not determined.

When an ignition switch is turned on, the parking compartmentrecognition apparatus 1 may start the process shown in FIG. 9 regardlessof the speed of the vehicle 9.

With reference to FIG. 9, the detection setter 12 acquires the travelingstate of the vehicle 9 (a step S11). For example, the detection setter12 acquires the speed of the vehicle 9 from a speed sensor (not shown),and acquires the rotation angle of the steering wheel of the vehicle 9from a rotation angle sensor (not shown). The detection setter 12acquires the traveling direction of the vehicle 9 from the shiftposition sensor (not shown).

The detection setter 12 determines whether or not the speed of thevehicle 9 acquired in the step S11 is greater than the startingreference value (a step S12). When the speed of the vehicle 9 is greaterthan the starting reference value (Yes in the step S12), the parkingcompartment recognition apparatus 1 ends the process shown in FIG. 9. Onthe other hand, when the speed of the vehicle 9 is equal to or lowerthan the starting reference value (No in the step S12), the detectionsetter 12 moves to a step S13.

The detection setter 12 selects two cameras to be used for detecting theparking compartment L from among the cameras 3 based on the travelingstate acquired in the step S11 (the step S13). In the step S13, thesetting table 19 stored in the memory 17 is referenced. A number of theselected cameras is smaller than the number of the cameras 3. As aresult, even when the parking compartment detector 15 cannotsimultaneously detect the parking compartment L from the imagesgenerated by each of the cameras 3, the parking compartment can bedetected.

FIG. 10 illustrates one example of the setting table 19 that is storedin the memory 17. With reference to FIG. 10, for example, when thevehicle 9 is moving forward at a speed of 10 km/h, the detection setter12 determines that the traveling state of the vehicle 9 corresponds to amode ID “1”, and selects the left side camera 3L and the right sidecamera 3R. Based on the setting table 19, the left side camera 3L isassigned to the first detector 21, and the right side camera 3R isassigned to the second detector 22. That is, by the step S13, thedetection setter 12 determines the frames in which each of the firstdetector 21 and the second detector 22 detects the parking compartmentL.

The detection setter 12 determines the detection modes of the firstdetector 21 and the second detector 22 based on the traveling stateacquired in the step S11 (a step S14). In the step S14, the settingtable 19 stored in the memory 17 is referenced. With reference to FIG.10, for example, when the traveling mode of the vehicle 9 corresponds tothe mode ID “1”, the detection setter 12 determines the detection modesof both the first detector 21 and the second detector 22 to be thesimple mode.

The detection area specifying part 14 specifies the detection areas ofthe frames in which each of the first detector 21 and the seconddetector 22 detects the parking compartment L (a step S15). For example,when the first detector 21 detects the parking compartment L from theleft side frame 31L, the detection areas to be specified in the leftside frame 31L differ between the simple mode and the detailed mode.Details of the step S15 will be described later.

The parking compartment detector 15 acquires the frames generated by thecameras selected in the step S13 from the image acquisition part 11, anddetects the parking compartment L from the detection areas specified inthe acquired frames (a step S16). Each of the first detector 21 and thesecond detector 22 detects the parking compartment L from the detectionareas of the acquired frames according to the detection mode determinedin the step S14. Details of the step S16 will be described later.

The parking compartment detector 15 updates the compartment list 18based on the detection results of the parking compartment L in the stepS16 (a step S17). Details of the step S17 will be described later. Theparking compartment detector 15 outputs the updated compartment list 18to the vehicle controller 2.

[3.2. Detection of Parking Compartment (Step S16)]

Prior to a detailed description of specifying the detection area (thestep S15), the detection of the parking compartment L (the step S16)will be described. When the detection area specifying part 14 specifiesthe detection area in the detailed mode, the detection area specifyingpart 14 uses the parking reference position S and the position of thestarting point of the border line B in the parking compartment Lpreviously detected. Therefore, first, a method of identifying theparking reference position S and the position of the starting point ofthe border line B will be described in detail.

The detection of the parking compartment L will be hereinafter describedby taking a case in which the parking compartment L is detected by usingthe left side frame 31L generated by the left side camera 3L as anexample.

FIG. 11 is a partially enlarged diagram of the parking lot shown in FIG.3. With reference to FIG. 11, it is assumed that the vehicle 9 istraveling on the traveling road A in the parking lot in a direction ofan arrow C1. The parking compartment recognition apparatus 1 detectsparking compartments L1, L2 and L3 from the left side frame 31Lgenerated by the left side camera 3L. The parking compartmentrecognition apparatus 1 detects the parking compartment L2 even whenanother vehicle is parked in the parking compartment L2.

The white lines W that form the parking compartment L1 are described asa white line W1 and a white line W2. The white lines W that form theparking compartment L3 are described as a white line W3 and a white lineW4. The parking compartment L2 is formed by the white line W2 and thewhite line W3.

FIG. 12 illustrates one example of the left side frame 31L generated bythe left side camera 3L. With reference to FIG. 12, a position of apixel of the left side frame 31L is represented by a two-dimensionalcoordinate system in which an upper left vertex is an origin Oi. An xaxis extends rightward from the origin Oi, and a y axis extends downwardfrom the origin Oi. The coordinate system defined by the left side frame31L is described as an “image coordinate system”.

(Selection of Attention Pixel)

FIG. 13 is a flowchart of a parking compartment detection process (thestep S16). With reference to FIG. 13, the border-line detector 211selects an attention pixel from among the pixels of the left side frame31L (a step S201). Selection criteria of the attention pixel differbetween the simple mode and the detailed mode.

In the simple mode, the border-line detector 211 intermittently selectsthe attention pixel. For example, the border-line detector 211 selectsthe attention pixel at a rate of one in five pixels for an x-axisdirection, and selects the attention pixel at a rate of one in threepixels for a y-axis direction. In other words, the border-line detector211 selects the attention pixel after decimating four pixels for thex-axis direction, and selects the attention pixel after decimating twopixels for the y-axis direction. By intermittently selecting theattention pixel in the simple mode, the processing load caused bydetecting the parking compartment L from a wide area is prevented fromincreasing.

In the detailed mode, the border-line detector 211 selects all thepixels included in the detection area as the attention pixel. As aresult, since the border-line detector 211 can accurately detect adirection of the border line B and the position of the starting point,which will be described later, the detection accuracy of the parkingcompartment L is improved.

In the detailed mode, the border-line detector 211 does not have toselect all the pixels included in the detection area as the attentionpixel. A selection interval of the attention pixels in the detailed modemay be narrower than the selection interval of the attention pixels inthe simple mode.

(Detection of Edge Point)

The border-line detector 211 identifies an adjacent pixel adjacent tothe attention pixel selected in the step S201. The border-line detector211 detects an edge point based on an absolute value of a differencebetween brightness of the attention pixel and brightness of the adjacentpixel (a step S202). The edge point is a general term for a positiveedge point and a negative edge point. The positive edge point is a pointat which the brightness increases toward the positive direction of the xaxis or y axis, and the calculated absolute value of the difference isgreater than a predetermined edge reference value. The negative edgepoint is a point at which the brightness decreases toward the positivedirection of the x axis or y axis, and the calculated absolute value ofthe difference is greater than the edge reference value.

The border-line detector 211 transforms the position of the detectededge point from the image coordinate system into the world coordinatesystem (a step S203).

The border-line detector 211 repeats the step S201 to the step S203until selection of the attention pixel is ended (Yes in a step S204).

(Generation of Edge Line)

The border-line detector 211 generates an edge line by connecting edgepoints that have been transformed into the world coordinate system inthe step S203 (a step S205). The edge line is a general term for apositive edge line and a negative edge line. The positive edge line isgenerated by connecting two or more positive edge points that are linedup with a shorter distance than a predetermined connection referencevalue. The negative edge line is generated by connecting two or morenegative edge points that are lined up with a shorter distance than theconnection reference value. The edge line constitutes a part of theoutline of the white line W.

The border-line detector 211 identifies the positive edge line having abend greater than a predetermined bend reference value among thegenerated positive edge lines. The border-line detector 211 cuts theidentified positive edge line at the positive edge point at which thebend greater than the bend reference value is caused. The bend referencevalue is, for example, 100. The border-line detector 211 generates alinear edge line to detect the white line W and the border line B thatis the outline of the parking compartment L extending in a long-sidedirection.

FIG. 14 illustrates one example of the edge line that is generated inthe step S205. In FIG. 14, a width of each of the white lines W1 to W3is exaggeratingly represented, and indications of the white line W4 andthe parking compartments L1 to L3 are omitted.

In the example shown in FIG. 14, a positive edge line CP1 is generatedby connecting positive edge points PE1 to PE4. Similarly, positive edgelines CP2 and CP3 are generated. In the positive edge lines CP2 and CP3,indications of the positive edge points other than the positive edgepoints PE5 and PE6 are omitted.

A negative edge line CM2 is generated by connecting negative edge pointsME1 to ME4. Similarly, negative edge lines CM1 and CM3 are generated. InFIG. 14, excluding negative edge points ME5 and ME6, indications ofnegative edge points that constitute the negative edge lines CM1 and CM3are omitted.

Although the edge lines shown in FIG. 14 are of the same length, theedge lines that are generated in the step S205 are not always of thesame length. When the entire white line W2 appears in the left sideframe 31L as shown by the white line W2 in FIG. 12, the border-linedetector 211 can detect the edge line corresponding to a length of thelong side of the white line W2. However, as shown by the white line W3in FIG. 12, when a part of the white line W3 is hidden by anothervehicle, the border-line detector 211 detects the edge linecorresponding to a part of the long side of the white line W3 thatappears in the left side frame 31L. In this case, the edge lines thatare generated in the step S205 are not of the same length.

(Determination of Parking Compartment L)

The compartment determiner 212 acquires the edge line generated by theborder-line detector 211. The compartment determiner 212 generates apair of the positive edge line and the negative edge line that areparallel to each other from the acquired edge lines (a step S206).

Specifically, the compartment determiner 212 selects one positive edgeline and one negative edge line that are adjacent to each other. When anangle that is formed by the selected two edge lines is smaller than apredetermined parallel reference value, the compartment determiner 212determines that the selected two edge lines are parallel, and generatesthe pair of the selected two edge lines. The parallel reference valueis, for example, 2 degrees.

The compartment determiner 212 determines a position of a starting pointof each of the two edge lines constituting the pair generated in thestep S206 (a step S207). For example, when the vehicle 9 is outside theparking compartment L, the compartment determiner 212 determines the endpoint closer to the vehicle 9 among two end points of the positive edgeline constituting the pair to be the starting point of the positive edgeline. The starting point of the negative edge line constituting the pairis similarly determined.

When the vehicle 9 is within the parking compartment L, the compartmentdeterminer 212 determines the end point having a larger X coordinatevalue among the two end points of the positive edge line constitutingthe pair to be the starting point of the positive edge line. Thestarting point of the negative edge line constituting the pair issimilarly determined.

The compartment determiner 212 determines whether or not a distancebetween the two edge lines constituting the pair corresponds to a widthof the parking compartment L (a step S208). Specifically, thecompartment determiner 212 calculates a distance between the startingpoint of the positive edge line and the starting point of the negativeedge line as the distance between the two edge lines constituting thepair. The compartment determiner 212 determines whether or not thecalculated distance is within a predetermined range corresponding to thewidth of the parking compartment L. The predetermined range isdetermined based on a width of a standard passenger car, and is, forexample, 2 to 2.5m.

When the calculated distance is within the predetermined range (Yes inthe step S208), the compartment determiner 212 determines that theparking compartment L has been detected based on the two edge linesconstituting the pair (a step S209). That is, the compartment determiner212 determines that the two edge lines constituting the pair are borderlines B of the parking compartment L.

As described above, when detected two border lines B are parallel, thecompartment determiner 212 determines whether or not these two borderlines B form an outline of the parking compartment L based on a distancebetween these two border lines B. That is, the compartment determiner212 detects the parking compartment based on a position relation of thedetected two border lines. Since lengths of the two border lines do nothave to be used for detecting the parking compartment, even when a partof a white line is hidden by an obstacle, the parking compartment can bedetected. For example, the parking compartment in which another vehiclehas been already parked can be detected.

FIG. 15 illustrates one example of detecting the parking compartment L.With reference to FIG. 15, since the positive edge line CP1 and thenegative edge line CM2 which are adjacent to each other are parallel,the compartment determiner 212 generates a pair composed of the positiveedge line CP1 and the negative edge line CM2. The positive edge pointPE1 is determined to be the starting point of the positive edge lineCP1. The negative edge point ME1 is determined to be the starting pointof the negative edge line CM2. A distance D1 between the positive edgepoint PE1 and the negative edge point ME1 is within the predeterminedrange. Therefore, the compartment determiner 212 determines that aparking compartment L1 has been detected based on the positive edge lineCP1 and the negative edge line CM2. The positive edge line CP1 and thenegative edge line CM2 are border lines B of the parking compartment L1extending in a long-side direction.

Since the positive edge line CP1 and the negative edge line CM1 whichare adjacent to each other are parallel, the compartment determiner 212generates a pair composed of the positive edge line CP1 and the negativeedge line CM1. The negative edge point ME5 is determined to be thestarting point of the negative edge line CM1. The distance D1 betweenthe positive edge point PE1 and the negative edge point ME5 is outsidethe predetermined range. The distance D1 is a width of the white lineW1, and is greatly different from the width of the standard passengercar. As a result, the compartment determiner 212 determines that thepair of the positive edge line CP1 and the negative edge line CM1 doesnot form the parking compartment L.

Similarly, the compartment determiner 212 detects a parking compartmentL2 based on the positive edge line CP2 and the negative edge line CM3.The parking compartment L3 shown in FIG. 11 is similarly detected.

(Determination of Parking Reference Position S)

The compartment determiner 212 determines the parking reference positionS of the parking compartment L detected in the step S209 (a step S210).With reference to FIG. 15, the step S210 will be described by taking acase in which a parking reference position S1 of the parking compartmentL1 is determined as an example.

The compartment determiner 212 determines a center line K1 of theparking compartment L1 based on the positive edge line CP1 and thenegative edge line CM2 which form the border lines B of the parkingcompartment L1. Specifically, the compartment determiner 212 identifiesa line segment E1 connecting the positive edge point PE1 as the startingpoint of the positive edge line CP1 with the negative edge point ME1 asthe starting point of the negative edge line CM2. The compartmentdeterminer 212 determines a linear line that passes through a midpointM1 of the identified line segment E1 and is parallel to one of thepositive edge line CP1 and the negative edge line CM2 to be the centerline K1 of the parking compartment L1.

The compartment determiner 212 determines a point that exists on thecenter line K1 located within the parking compartment L1 and exists at aposition a length Lg away from the midpoint M1 to be the parkingreference position S1 of the parking compartment L1. The length Lg isdetermined based on a vehicle length of the vehicle 9. The length Lg is,for example, a distance between a front end surface of the vehicle 9 andthe rear wheel rotating shaft of the vehicle 9.

The compartment determiner 212 determines a reliability of the detectedparking compartment L (a step S211). The reliability shows certainty ofthe detected parking compartment L1, and is, for example, a numericalvalue of not less than 0 and not more than 1. As the reliability becomescloser to 1, a possibility that the detected parking compartment Lexists becomes higher.

For example, the reliability is determined based on a length of each ofthe two edge lines used for identifying the parking compartment L. Asthe length of each of the two edge lines used for identifying theparking compartment L1 is longer, the reliability becomes closer to 1.Alternatively, the reliability may be determined based on density ofeach of the two edge lines used for identifying the parking compartmentL. For example, as a distance between the positive edge point and thenegative edge point is shorter, the reliability becomes closer to 1.That is, when one detection area is detected in both the detailed modeand the simple mode, the reliability of the detailed mode becomes higherthan the reliability of the simple mode. This is because, in thedetailed mode, the attention pixels are selected more densely than inthe simple mode.

The compartment determiner 212 generates compartment data thatidentifies the detected parking compartment L (a step S212). Thecompartment data includes the parking reference position S of thedetected parking compartment L, the position of the starting point ofeach of the two edge lines that identify the parking compartment L andthe reliability of the parking compartment L. The compartment determiner212 outputs the generated compartment data to the list manager 213.

The compartment determiner 212 determines whether or not identificationof the pair composed of the two edge lines has ended (a step S213). Whenthe identification of the pair has ended (Yes in the step S213), thecompartment determiner 212 ends a process shown in FIG. 13. When theidentification of the pair has not ended (No in the step S213), thecompartment determiner 212 returns to the step S206.

The second detector 22 executes the same process as the first detector21, detects the parking compartment L from the input frame and outputsthe compartment data that identifies the detected parking compartment Lto the list manager 213.

[3.3. Updating of Compartment List (Step S17)]

The compartment determiners 212 and 222 respectively output thecompartment data that shows the detected parking compartment L to thelist manager 213. The list manager 213 updates the compartment list 18based on the compartment data received from the compartment determiners212 and 222 (the step S17 shown in FIG. 9).

FIG. 16 illustrates one example of the compartment list 18. Withreference to FIG. 16, data (record) of one row is the compartment datathat shows each of the parking compartments L. The compartment list 18records an ID, a detection time, a parking reference position, a firststarting point, a second starting point and the reliability. The ID isan identification number that uniquely identifies the parkingcompartment L recorded in the compartment list 18. The detection time isthe generation time of the frame in which the parking compartment L hasbeen detected. The parking reference position, the first starting point,the second starting point and the reliability are the data recorded inthe compartment data generated in the step S212. The parking referenceposition, the first starting point and the second starting point aredescribed in the world coordinate system.

FIG. 17 is a flowchart illustrating an operation of the list manager213. When the list manager 213 has received the compartment data fromboth the compartment determiner 212 and the compartment determiner 222,the list manager 213 starts a process shown in FIG. 17. The step S17will be hereinafter described in detail by taking a case in-which thelist manager 213 updates the compartment list 18 based on thecompartment data of the parking compartment L1 as an example.

First, the list manager 213 multiples all the reliabilities recorded inthe compartment list 18 by a coefficient smaller than 1 (a step S251).As a result, the list manager 213 reduces all the reliabilities recordedin the compartment list 18. The reason to execute the step S251 will bedescribed later.

The list manager 213 determines whether or not the parking referenceposition S1 recorded in the compartment data has been recorded in thecompartment list 18 (a step S252). For example, the list manager 213calculates a distance between the parking reference position of the ID1and the parking reference position S1 recorded in the compartment data.When the calculated distance is within the predetermined range thatshows the same position, the list manager 213 determines that theparking reference position S1 recorded in the compartment data has beenrecorded in the compartment list 18 (Yes in the step S252).

In this case, the list manager 213 compares the reliability recorded inthe compartment data with the reliability of the ID1 recorded in thecompartment list 18 (a step S253).

When the reliability recorded in the compartment data is equal to orgreater than the reliability of the ID1 (Yes in a step S254), the listmanager 213 overwrites a record of the ID1 with the compartment data ofthe parking compartment L1 (a step S255).

On the other hand, when the reliability recorded in the compartment datais smaller than the reliability of the ID1 (No in the step S254), thelist manager 213 keeps the record of the ID1 (a step S258).

The step S252 will be described again. When the parking referenceposition S1 is not recorded in the compartment list 18 (No in the stepS252), the list manager 213 adds the compartment data of the parkingcompartment L1 to the compartment list 18 (a step S257).

The list manager 213 corrects the parking reference position S of eachof the parking compartments recorded in the compartment list 18, thefirst starting point and the second starting point based on thetraveling state of the vehicle 9 (a step S256). The overwritten recordand the newly added compartment data are corrected based on the movingamount of the vehicle 9 during the period between the generation time ofthe frames and the present time. The record not updated in thecompartment list 18 is corrected based on the moving amount of thevehicle 9 during the period between a previous updating time and thepresent time. When the vehicle 9 moves, errors in the parking referenceposition S, the first starting point and the second starting pointincrease. By correcting the parking position S, the first starting pointand the second starting point recorded in the compartment list 18, thelist manager 213 suppresses the errors. The list manager 213 outputs thecorrected compartment list 18 to the vehicle controller 2.

When executing the step S256, the list manager 213 deletes the recordhaving the parking reference position S a predetermined distance awayfrom the origin Ow. This is because there is a low possibility that thevehicle 9 is parked in the parking compartment L in a position away fromthe vehicle 9.

A reason why the reliability recorded in the compartment list 18 isdecreased in the step S251 will be described. When the record in thecompartment list 18 is not overwritten, a process of multiplying thereliability of this record by the coefficient smaller than 1 isrepeated. As a result, the reliability of the record that is notoverwritten becomes closer to 0.

Since the previously detected parking compartment L can be preventedfrom being continuously recorded in the compartment list, the accuracyof the parking compartment L can be improved.

[3.4. Specifying Detection Area (Step S15)]

(Simple Mode)

The detection setter 12 informs the detection area specifying part 14 ofthe frame that is processed by the first detector 21 and the detectionmode of the first detector 21. The detection area specifying part 14specifies the detection area of the frame that is processed by the firstdetector 21 based on the information from the detection setter 12 (thestep S15 shown in FIG. 9). The detection area specifying part 14similarly specifies the detection area of the frame that is processed bythe second detector 22.

Specifying the detection area in the simple mode will be hereinafterdescribed by taking a case in which the first detector 21 detects theparking compartment L from the left side frame 31L in the simple mode asan example. The same thing applies to the specifying of the detectionarea in a case where the detection mode of the second detector 22 is thesimple mode.

The area table 32 previously records the detection area in the simplemode to be set for the frames generated by each of the cameras 3. Thedetection area in the simple mode is different depending on the camerato be assigned to the first detector 21. This is because an imaging areacaptured by each camera is different depending on the installationposition and an optical axis direction of each camera.

When the left side camera 3L is assigned to the first detector 21, thedetection area specifying part 14 acquires the detection area in thesimple mode associated with the left side camera 3L from the area table32, and specifies the acquired detection area as the detection area ofthe left side frame 31L. The detection area specifying part 14 informsthe border-line detector 211 of the specified detection area of the leftside frame 31L. The border-line detector 211 selects the attention pixelfrom the pixels within the informed detection area (the step S201 shownin FIG. 13).

As a result, as shown in FIG. 7, the detection area 31K in the simplemode is specified in the left side frame L. In an example shown in FIG.7, an area in which the vehicle body of the vehicle 9 does not appear inthe left side frame 31L is specified as the detection area. Thus, it ispossible to reduce the load on the first detector 21 that detects theparking compartment L. The detection area specifying part 14 may specifyan area in which a road surface is assumed to appear in the left sideframe 31L as the detection area.

The detection area specified in the simple mode is specified in theimage coordinate system. Therefore, the detection area specifying part14 outputs the detection area acquired from the area table 32 to thefirst detector 21 as it is.

(Detailed Mode)

An operation of the detection area specifying part 14 will be describedby taking a case in which the detailed mode is set as the detection modeof the first detector 21 as an example. It is assumed that the detectionsetter 12 assigns the left side camera 3L to the first detector 21.

In this case, the detection area specifying part 14 specifies thedetection area based on the parking reference position S of the parkingcompartment L recorded in the compartment list 18 and positions of thefirst starting point and the second starting point. FIG. 18 illustratesa method of setting the detection area in the detailed mode.

For example, when the parking compartment L1 is registered in thecompartment list 18, the detection area specifying part 14 sets twodetection areas G1 and G2 based on the parking reference position S1 ofthe parking compartment L1 and positions of the first starting point andthe second starting point. Specifically, the detection area specifyingpart 14 identifies the midpoint M1 connecting the starting point PE1 andthe starting point ME1. The detection area specifying part 14 identifiesa straight line connecting the identified midpoint M1 and the parkingreference position S1 as the center line K1.

The detection area specifying part 14 sets a rectangular detection areaG1 that includes the starting point PE1 of the edge line and has a longside extending in a direction in which the center line K1 extends. Thedetection area specifying part 14 sets a rectangular detection area G2that includes the starting point ME1 of the edge line and has a longline extending in a direction in which the center line K1 extends. As aresult, the two detection areas G1 and G2 based on the parkingcompartment L1 are set.

Lengths of short sides of the detection areas G1 and G2 are set based ona general width of the white line W. The lengths of the long sides ofthe detection areas G1 and G2 are set to be, for example, 1.5 m. Thatis, the detection area to be set in the detailed mode does not includethe entire white line W. Since the parking compartment L is identifiedbased on the parking reference position S and the starting point of theborder line B that constitute the outline of the white line W, theentire white line W does not have to be detected. As a result, an areaof the detection area in the detailed mode can be decreased. Even whenall the pixels of the detection area are selected as the attentionpixels, the parking compartment L can be immediately detected.

Although not shown in FIG. 18, the detection area specifying part 14specifies the detection area corresponding to the parking compartmentL2. Specifically, the detection area corresponding to the parkingcompartment L2 is determined based on the parking reference position Sof the parking compartment L2, and positions of two starting points (thepositive edge point PE5 and the negative edge point ME6). As a result,the detection area G2 overlaps with the detection area corresponding tothe parking compartment L2. This is because the negative edge point ME1and the positive edge point PE5 are vertices of the same white line. Inthis case, the detection area specifying part 14 informs the firstdetector 21 of a sum area of the two detection areas G1 and G2.

The detection area specified in the detailed mode is described in theworld coordinate system. Thus, the detection area specifying part 14transforms the coordinate system of the specified detection area fromthe world coordinate system to the image coordinate system of the leftside frame 31L. The detection area specifying part 14 outputs thedetection area transformed into the image coordinate system to the firstdetector 21.

In an example shown in FIG. 8, a hatching area 31N is the detection areathat is specified in the detailed mode. The hatching area 31N is set soas to include the end point closer to the vehicle 9 among the end pointsof the white line. The detection area that is specified in the detailedmode is narrower than the detection area that is specified in the simplemode. In the detailed mode, a number of the pixels included in thedetection area is smaller than in the simple mode. When the detailedmode is set, all the pixels included in the detection area are set tothe attention pixels. Thus, the detection accuracy of the parkingcompartment L can be improved.

[4. First Example of Traveling State of Vehicle 9]

FIG. 19 illustrates a first example of a parking route of the vehicle 9shown in FIG. 2. With reference to FIG. 19, the vehicle 9 is parked in aparking compartment La by traveling on a route indicated by an arrow C4after traveling on a route indicated by an arrow C3. The cameras and thedetection modes that are selected according to the traveling state ofthe vehicle 9 will be described by taking a case in which the vehicle 9is parked in the parking compartment La as an example.

[4.1. Case in which Vehicle 9 is Traveling Straight at Normal Speed]

It is assumed that the vehicle 9 is traveling straight whiledecelerating in a section between a position P11 and a position P12 asshown in FIG. 19. Specifically, the speed of the vehicle 9 is 15 km/h atthe position P11 and 8 km/h at the position P12. The rotation angle ofthe steering wheel of the vehicle 9 is 00 in the section between theposition P11 and the position P12. In this case, the parking compartmentrecognition apparatus 1 starts the process shown in FIG. 9 at theposition P11.

(Selection of Camera)

Since the vehicle 9 is traveling straight at a speed of 8 km/h or more,the traveling state of the vehicle 9 corresponds to the mode ID “1” inthe setting table 19 shown in FIG. 10. Therefore, the detection setter12 selects the left side camera 3L and the right side camera 3R (thestep S13 shown in FIG. 9). The left side camera 3L is assigned to thefirst detector 21.

The right side camera 3R is assigned to the second detector 22.

(Determination of Detection Mode)

Since the traveling state of the vehicle 9 corresponds to the mode ID“1”, the detection setter 12 sets the detection mode of each of thefirst detector 21 and the second detector 22 to the simple mode (thestep S14 shown in FIG. 9).

The detection setter 12 informs the image acquisition part 11 of thecameras selected in the step S13. The image acquisition part 11 outputsthe frames generated by the cameras selected in the step S13 to thefirst detector 21 and the second detector 22 based on the informationfrom the detection setter 12. The frames are output at regularintervals. The regular intervals are determined based on processingspeeds of the first detector 21 and the second detector 22 and are, forexample, 0.3 seconds.

Since the detection modes of the first detector 21 and the seconddetector 22 are the simple mode, the detection area specifying part 14specifies the detection areas of the left side frame 31L and the rightside frame 31R based on the area table 32 stored in the memory 17 (thestep S15).

The first detector 21 and the second detector 22 detect the parkingcompartment L from the detection areas of the left side frame 31L andthe right side frame 31R (the step S16). The compartment list 18 isupdated based on the parking compartment L detected based on the stepS16 (the step S17).

When the vehicle 9 is traveling straight at a speed of 8 km/h or more,the parking compartment recognition apparatus 1 repeats a process fordetecting the parking compartment L by using left and right cameras.

When the vehicle 9 is traveling straight at a speed of 8 km/h or more,there is a low possibility that the vehicle 9 immediately stops toperform the backward parking. In this case, the parking compartmentrecognition apparatus 1 selects the left side camera 3L that captures aleft-side wide area of the vehicle 9 and the right side camera 3R thatcaptures a right-side wide area of the vehicle 9 in order to detect asmany parking compartments L as possible.

The simple mode is set as the detection modes of the first detector 21and the second detector 22. In the simple mode, since previous detectionresults of the parking compartment L are not used, a new parkingcompartment L can be detected. Therefore, many parking compartments Lcan be detected.

[4.2. Case in which Vehicle 9 is Traveling Straight at IntermediateSpeed]

It is assumed that the vehicle 9 is traveling straight at a speed of 4to 8 km/h in a section between the position P12 and a position P13 asshown in FIG. 19. In this case, the rotation angle of the steering wheelis 0°.

The detection setter 12 determines that the traveling state in thesection between the position P12 and the position P13 corresponds to amode ID “3” in the setting table 19 shown in FIG. 10. As a result, thedetection setter 12 assigns the left side camera 3L and the right sidecamera 3R to the first detector 21, and assigns the rear camera 3B tothe second detector 22 (the step S13). The first detector 21 alternatelyrepeats the process for detecting the parking compartment L from theleft side frame 31L and the process for detecting the parkingcompartment L from the right side frame 31R. As described above, byassigning two or more cameras to the first detector 21, it is possibleto select the cameras more in number than the detectors included in theparking compartment detector 15.

The detection setter 12 sets the detection modes of the first detector21 and the second detector 22 to the simple mode based on the travelingstate in the section between the position P12 and the position P13 (thestep S14).

The detection area specifying part 14 specifies the detection areas ofthe frames generated by the cameras assigned to each of the firstdetector 21 and the second detector 22 (the step S15). Specifically, thedetection area specifying part 14 determines the detection area of eachof the left side frame 31L and the right side frame 31R in a case wherethe simple mode is set, and informs the first detector 21 of thedetermined two detection areas. The detection area specifying part 14determines the detection area of the rear frame 31B in a case where thesimple mode is set, and informs the second detector 22 of the determineddetection area.

The first detector 21 detects the parking compartment L from thedetection areas of the left side frame 31L and the right side frame 31R(the step S16). That is, the first detector 21 repeats the process fordetecting the parking compartment L from the left side frame 31L and theprocess for detecting the parking compartment L from the right sideframe 31R. The second detector 22 detects the parking compartment L fromthe detection area of the rear frame 31B (the step S16). The compartmentlist 18 is updated based on the parking compartment L detected based onthe step S16 (the step S17).

When the vehicle 9 is traveling straight at a speed of 4 to 8 km/h, itis supposed that the vehicle 9 is decelerating near the vacant parkingcompartment L. As a result, the parking compartment recognitionapparatus 1 detects the parking compartment L by using not only the leftside camera 3L and the right side camera 3R but also the rear camera 3B,assuming that the backward parking is performed.

[4.3. Case in which Vehicle 9 Turns Right at Intermediate Speed]

It is assumed that the vehicle 9 is turning right at a speed of 4 to 8km/h in a section between the position P13 and a position P14 as shownin FIG. 19. In this case, the rotation angle of the steering wheel is2500.

The detection setter 12 determines that the traveling state in thesection between the position P13 and the position P14 corresponds to amode ID “4” in the setting table 19 shown in FIG. 10. As a result, thedetection setter 12 assigns the left side camera 3L to the firstdetector 21 and assigns the rear camera 3B to the second detector 22(the step S13). The detection setter 12 sets the detection modes of thefirst detector 21 and the second detector 22 to the simple mode (thestep S14).

The detection area specifying part 14 specifies the detection areas ofthe frames generated by the cameras assigned to each of the firstdetector 21 and the second detector 22 (the step S15). Specifically, thedetection area specifying part 14 determines the detection area of eachof the left side frame 31L and the rear frame 31B in a case where thesimple mode is set based on the area table 32. The detection areaspecifying part 14 informs the first detector 21 of the detection areaof the left side frame 31L, and informs the second detector 22 of thedetection area of the rear frame 31B.

The first detector 21 detects the parking compartment L from thedetection area of the left side frame 31L (the step S16). The seconddetector 22 detects the parking compartment L from the detection area ofthe rear frame 31B (the step S16). The compartment list 18 is updatedbased on the parking compartment L detected based on the step S16 (thestep S17).

When the vehicle 9 is turning right at a speed of 4 to 8 km/h, it issupposed that the driver of the vehicle 9 intends to park the vehicle 9in the parking compartment L located on the left rear side of thevehicle 9. According to the above idea, the parking compartmentrecognition apparatus 1 selects the left side camera 3L that captures animage of the outside area of the turning track of the vehicle 9 and therear camera 3B that captures the rear view of the vehicle 9. The firstdetector 21 does not execute the process for detecting the parkingcompartment L from the right side frame 31R, different from when thevehicle 9 is traveling in the section between the position P12 and theposition P13. Therefore, it is possible to continuously detect theparking compartment in which the vehicle 9 is most likely to be parked.

[4.4. Case in which Vehicle 9 Turns Right at Speed Just Before Stopping]

It is assumed that the vehicle 9 turns right at a speed of 4 km/h orless in a section between the position P14 and a position P15 as shownin FIG. 19, and stops at the position P15. The rotation angle of thesteering wheel is 250°. An operation of the parking compartmentrecognition apparatus 1 in a case where the vehicle 9 is traveling inthe section between the position P14 and the position P15 will bedescribed.

The detection setter 12 determines that the traveling state in thesection between the position P14 and the position P15 corresponds to amode ID “7” in the setting table 19 shown in FIG. 10. As a result, thedetection setter 12 assigns the left side camera 3L to the firstdetector 21 and assigns the rear camera 3B to the second detector 22(the step S13). The detection setter 12 sets the detection mode of thefirst detector 21 to the simple mode and sets the detection mode of thesecond detector 22 to the simple mode and the detailed mode (the stepS14).

The detection area specifying part 14 specifies the detection areas ofthe frames generated by the cameras assigned to each of the firstdetector 21 and the second detector 22 (the step S15). Specifically,since the detection mode of the first detector 21 is the simple mode,the detection area specifying part 14 determines the detection area ofthe left side frame 31L based on the area table 32. The detection modeof the second detector 22 is the simple mode and the detailed mode. Thedetection area specifying part 14 first determines the detection area ofthe rear frame 31B based on the area table 32.

The first detector 21 detects the parking compartment L from the leftside frame 31L (the step S16). The second detector 22 detects theparking compartment L from the detection area of the rear frame 31B (thestep S16). The compartment list 18 is updated based on the parkingcompartment L detected based on the step S15 (the step S17).

The detection area specifying part 14 determines the detection area ofthe rear frame 31B based on the updated compartment list 18. That is,the detection area specifying part 14 determines the detection area ofthe rear frame 31B in the detailed mode. The second detector 22 detectsthe parking compartment L from the rear frame 31B in the detailed mode(the step S16). Then, the second detector 22 alternately repeats thesimple mode and the detailed mode. On the other hand, the first detector21 repeatedly executes the detection of the parking compartment L in thesimple mode.

When the vehicle 9 is turning right at a speed of 4 km/h or less, it issupposed that the driver of the vehicle 9 immediately stops the vehicle9 to turn the vehicle 9. The parking compartment La is located on theleft rear side of the vehicle 9 and the backward parking is soonstarted. Thus, the parking compartment recognition apparatus 1 executesthe process for detecting the parking compartment L from the rear frame31B in the detailed mode in addition to the process for detecting theparking compartment L from the left side frame 31L and the rear frame31B in the simple mode. As a result, the parking compartment recognitionapparatus 1 can detect the parking compartment La with a high accuracywhile detecting a wide range of the parking compartments L.

[4.5. Case in which Vehicle 9 is Moving Backward Outside ParkingCompartment L]

When the parking instruction switch 6 is pressed after the vehicle 9stops at the position P15, the vehicle controller 2 instructs the driverto select the parking compartment L. When the driver selects the parkingcompartment La, the vehicle controller 2 starts the parking assistance.Specifically, the vehicle controller 2 rotates the steering wheel tosteer the vehicle 9. The driver operates a gas pedal or a brake pedal ofthe vehicle 9.

It is assumed that the vehicle 9 is moving backward outside the parkingcompartment L. Specifically, the vehicle 9 is moving backward in asection between the position P15 and a position P16 as shown in FIG. 19.The section between the position P15 and the position P16 is outside theparking compartment La. The parking compartment recognition apparatus 1determines whether or not the origin Ow exists in the parkingcompartment La based on a parking reference position Sa of the parkingcompartment La, positions of the first starting point and the secondstarting point. For example, when the origin Ow does not cross a linesegment connecting the first starting point and the second startingpoint of the parking compartment La, the parking compartment recognitionapparatus 1 determines that the vehicle 9 exists outside the parkingcompartment La.

The detection setter 12 determines that the traveling state in thesection between the position P15 and the position P16 corresponds to amode ID “8” in the setting table 19 shown in FIG. 10. Therefore, thedetection setter 12 selects only the rear camera 3B. That is, the firstdetector 21 and the second detector 22 detect the parking compartment Lfrom the rear frame 31B. The detection setter 12 sets the detection modeof the first detector 21 to the simple mode and sets the detection modeof the second detector 22 to the detailed mode (the step S13).

The detection area specifying part 14 specifies the detection areas ofthe frames generated by the cameras assigned to each of the firstdetector 21 and the second detector 22 (the step S15). Specifically,since the detection mode of the first detector 21 is the simple mode,the detection area specifying part 14 determines the detection area ofthe rear frame 31B based on the area table 32. Since the detection modeof the second detector 22 is the detailed mode, the detection areaspecifying part 14 determines the detection area of the rear frame 31Bbased on the compartment list 18.

Since the backward parking is started, the parking compartment La topark the vehicle 9 is located on a rear side of the vehicle 9. As aresult, by executing the process for detecting the parking compartment Lfrom the rear frame 31B in both the simple mode and the detailed mode,the parking compartment recognition apparatus 1 can detect the parkingcompartment La located on the rear side of the vehicle 9 with a highaccuracy and prevent detection omission of the parking compartment Lalocated on the rear side of the vehicle 9.

[4.6. Case in which Vehicle 9 is Moving Backward within ParkingCompartment L]

It is assumed that the vehicle 9 is moving backward in the parkingcompartment L. Specifically, with reference to FIG. 19, the vehicle 9 ismoving backward in a section between the position P16 and the parkingreference position Sa of the parking compartment La. The section betweenthe position P16 and the parking reference position Sa is within theparking compartment La.

The detection setter 12 determines that the traveling state in thesection between the position P16 and the parking reference position Sacorresponds to a mode ID “9” in the setting table 19 shown in FIG. 10.Therefore, the detection setter 12 selects the left side camera 3L andthe right side camera 3R (the step S13). The detection setter 12 setsthe detection modes of both the first detector 21 and the seconddetector 22 to the detailed mode (the step S14).

The detection area specifying part 14 specifies the detection areas ofthe frames generated by the cameras assigned to each of the firstdetector 21 and the second detector 22 (the step S15). Specifically,since the detection modes of the first detector 21 and the seconddetector 22 are the detailed mode, the detection areas of the left sideframe 31L and the right side frame 31R are determined based on thecompartment list 18. At this time, it is desirable that the detectionarea specifying part 14 sets a length of a long side of the detectionarea to be greater than a length of the parking compartment in a generalvehicle length direction. The entire white line within the left sideframe 31L can be included in the detection area. The detection area ofthe right side frame 31R is also set similarly.

The first detector 21 detects the parking compartment L from thedetection area of the left side frame 31L (the step S16). The seconddetector 22 detects the parking compartment L from the detection area ofthe rear frame 31B (the step S16). The compartment list 18 is updatedbased on the parking compartment L detected based on the step S16 (thestep S17).

When the vehicle 9 is moving backward within the parking compartment La,the left side camera 3L and the right side camera 3R can capture animage of the entire white line that specifies the parking compartmentLa. Even when the parking compartment recognition apparatus 1 uses thedetailed mode, the parking compartment recognition apparatus 1 candetect the entire white line that specifies the parking compartment Laand detect the parking reference position Sa of the parking compartmentLa.

When the vehicle 9 is moving backward within the parking compartment La,one of the two border lines of the parking compartment La extending in along-side direction is captured by the left side camera 3L and the otheris captured by the right side camera 3R. In this case, the parkingcompartment detector 15 may determine the parking reference position Saof the parking compartment La based on the edge line detected from theleft side frame 31L and the edge line detected from the right side frame31R.

[5. Second Example of Traveling State of Vehicle 9]

FIG. 20 illustrates a second example of the parking route of the vehicle9 shown in FIG. 2. With reference to FIG. 20, the vehicle 9 is parked ina parking compartment Lb by traveling on a route indicated by an arrowC6 after traveling on a route indicated by an arrow C5. The cameras andthe detection modes that are selected according to the traveling stateof the vehicle 9 will be described by taking a case in which the vehicle9 is parked in the parking compartment Lb as an example.

[5.1. Case in which Vehicle 9 Travels Straight at Normal Speed]

It is assumed that the vehicle 9 is traveling straight whiledecelerating at a speed of 8 to 15 km/h in a section between a positionP21 and a position P22 as shown in FIG. 20. The rotation angle of thesteering wheel of the vehicle 9 is 00. The traveling state of thevehicle 9 corresponds to the mode ID “I” shown in FIG. 10. The parkingcompartment recognition apparatus 1 operates in the same way as when thevehicle 9 moves from the position P11 to the position P12 as shown inFIG. 19.

[5.2. Case in which Vehicle 9 Travels Straight at Intermediate Speed]

It is assumed that the vehicle 9 is traveling straight at a speed of 4to 8 km/h in a section between the position P22 and a position P23 asshown in FIG. 20. The rotation angle of the steering wheel is 0°. Thetraveling state of the vehicle 9 corresponds to the mode ID “3” shown inFIG. 10. The parking compartment recognition apparatus 1 operates in thesame way as when the vehicle 9 moves from the position P12 to theposition P13 as shown in FIG. 19.

[5.3. Case in which Vehicle 9 Travels at Speed Just Before Stopping]

It is assumed that the vehicle 9 is traveling straight at a speed of 4km/h or less in a section between the position P22 and the position P23as shown in FIG. 20. The rotation angle of the steering wheel is 0°. Thetraveling state of the vehicle 9 corresponds to a mode ID “6” shown inFIG. 10. The detection setter 12 assigns the left side camera 3L and theright side camera 3R to the first detector 21 and assigns the rearcamera 3B to the second detector 22 (the step S13). The detection setter12 sets the detection mode of the first detector 21 to the simple modeand sets the detection mode of the second detector 22 to the simple modeand the detailed mode (the step S14).

The detection area specifying part 14 specifies the detection areas ofthe frames generated by the cameras assigned to each of the firstdetector 21 and the second detector 22 (the step S15). Specifically, thedetection area specifying part 14 determines the detection area of eachof the left side frame 31L and the right side frame 31R in the simplemode. The detection area specifying part 14 determines the detectionarea of the rear frame 31B in the simple mode and the detection area ofthe rear frame 31B in the detailed mode.

When executing the step S16, the first detector 21 alternately repeatsthe process for detecting the parking compartment L from the left sideframe 31L and the process for detecting the parking compartment L fromthe right side frame 31R. When executing the step S16, the seconddetector 22 alternately repeats the process for detecting the parkingcompartment L in the simple mode and the process for detecting theparking compartment L in the detailed mode. The list manager 213 updatesthe compartment list 18 based on the parking compartments L detected bythe first detector 21 and the second detector 22 (the step S17).

When the vehicle 9 travels straight at a speed just before stopping, theparking compartment recognition apparatus 1 assigns the left side camera3L and the right side camera 3R to the first detector 21. This isbecause the parking compartment recognition apparatus 1 cannot identifywhether the vehicle 9 parks in a right rear direction or a left reardirection although the vehicle 9 is in a state just before starting toperform the backward parking. After the parking compartment recognitionapparatus 1 assigns the rear camera 3B to the second detector 22, theparking compartment recognition apparatus 1 sets the detection mode ofthe second detector 22 to the simple mode and the detailed mode. Asresult, the parking compartment recognition apparatus 1 can detect awide range of parking compartments and improve the detection accuracy ofthe parking compartments located on the rear side of the vehicle 9.

[5.4. Case in which Vehicle 9 Turns Left at Intermediate Speed]

It is assumed that the vehicle 9 turns left at a speed of 4 to 8 km/h ina section between the position P23 and a position P24 as shown in FIG.20. The rotation angle of the steering wheel is 250°. The travelingstate of the vehicle 9 corresponds to a mode ID “2” in the setting table19 shown in FIG. 10.

The detection setter 12 assigns the right side camera 3R to the firstdetector 21 and assigns the rear camera 3B to the second detector 22(the step S113). The detection setter 12 sets the detection modes of thefirst detector 21 and the second detector 22 to the simple mode (thestep S14). The detection area specifying part 14 determines thedetection area of each of the left side frame 31L and the rear frame 31Bin a case where the simple mode is set based on the area table 32 (thestep S15).

The first detector 21 detects the parking compartment L from thedetection area of the left side frame 31L (the step S16). The seconddetector 22 detects the parking compartment L from the detection area ofthe rear frame 31B (the step S16). The compartment list 18 is updatedbased on the parking compartment L detected based on the step S16 (thestep S17).

When the vehicle 9 turns left at a speed of 4 to 8 km/h, it is supposedthat the driver of the vehicle 9 intends to park the vehicle 9 in theparking compartment L located on the right rear side of the vehicle 9.According to the above idea, the parking compartment recognitionapparatus 1 selects the right side camera 3R that captures an image ofthe outside area of the turning track of the vehicle 9 and the rearcamera 3B that captures the rear view of the vehicle 9. As a result, itis possible to continuously detect the parking compartment in which thevehicle 9 is most likely to be parked.

[5.5. Case in which Vehicle 9 Turns Left at Speed Just Before Stopping]

It is assumed that the vehicle 9 turns left at a speed of 4 km/h or lessin a section between the position P24 and a position P25 as shown inFIG. 20, and stops at the position P25. The rotation angle of thesteering wheel is 250°. In this case, the traveling state of the vehicle9 corresponds to a mode ID “5” in the setting table 19 shown in FIG. 10.

The detection setter 12 assigns the right side camera 3R to the firstdetector 21 and assigns the rear camera 3B to the second detector 22(the step S13). The detection setter 12 sets the detection mode of thefirst detector 21 to the simple mode and sets the detection mode of thesecond detector 22 to the simple mode and the detailed mode (the stepS14).

Since the detection mode of the first detector 21 is the simple mode,the detection area specifying part 14 determines the detection area ofthe left side frame 31L based on the area table 32 (the step S15). Thedetection area specifying part 14 first determines the detection area ofthe rear frame 31B based on the area table 32 (the step S15).

The first detector 21 detects the parking compartment L from thedetection area of the left side frame 31L (the step S16). The seconddetector 22 detects the parking compartment L from the detection area ofthe rear frame 31B (the step S16). The compartment list 18 is updatedbased on the parking compartment L detected based on the step S15 (thestep S17).

The detection area specifying part 14 determines the detection area ofthe rear frame 31B based on the updated compartment list 18 (the stepS15). This is because the second detector 22 alternately repeats thesimple mode and the detailed mode. The second detector 22 detects theparking compartment L from the detection area of the rear frame 31B inthe detailed mode (the step S16).

When the vehicle 9 turns left at a speed of 4 km/h or less, it issupposed that the driver immediately stops the vehicle 9 to turn thevehicle 9. This is because the vehicle 9 is parked in the parkingcompartment Lb located on the right rear side of the vehicle 9. Theparking compartment recognition apparatus 1 executes the process fordetecting the parking compartment L from the rear frame 31B in thedetailed mode in addition to the process for detecting the parkingcompartment L from the left side frame 31L and the rear frame 31B in thesimple mode. As a result, the parking compartment recognition apparatus1 can detect the parking compartment Lb with a high accuracy whiledetecting a wide range of the parking compartments L.

[5.6. Case in which Vehicle 9 is Moving Backward Outside ParkingCompartment L]

After the vehicle 9 stops at the position P25 shown in FIG. 20, thedriver presses the parking instruction switch 6. The vehicle controller2 instructs the driver to select the parking compartment L according topressing of the parking instruction switch 6. When the driver selectsthe parking compartment Lb, the vehicle controller 2 starts the parkingassistance. Specifically, the vehicle controller 2 rotates the steeringwheel to steer the vehicle 9. The driver operates the gas pedal or thebrake pedal of the vehicle 9. The parking compartment recognitionapparatus 1 operates in a section between the position P25 and aposition P26 in the same way as when the vehicle 9 moves from theposition P15 to the position P16 as shown in FIG. 19.

[5.7. Case in which Vehicle 9 is Moving Backward within ParkingCompartment L]

It is assumed that the vehicle 9 is moving backward within the parkingcompartment Lb shown in FIG. 20. Specifically, the vehicle 9 is movingbackward in a section between the position P26 and a parking referenceposition Sb of the parking compartment Lb. The section between theposition P26 and the parking reference position Sa is within the parkingcompartment Lb. The parking compartment recognition apparatus 1 operatesin the section between the position P26 and the parking referenceposition Sb in the same way as when the vehicle moves from the positionP26 to the parking reference position Sb as shown in FIG. 19.

SUMMARY

As described above, the parking compartment recognition apparatus 1selects the cameras to be used for detecting the parking compartment Lfrom among a plurality of cameras 3 based on the traveling state of thevehicle 9. As a result, the parking compartment recognition apparatus 1can reduce a load for detecting the parking compartment L. The parkingcompartment recognition apparatus 1 changes the processing contents ofdetecting the parking compartment L based on the traveling state of thevehicle 9. As a result, the parking compartment recognition apparatus 1can reduce the load for detecting the parking compartment L withoutlowering the detection accuracy of the parking compartment L.

Modification

(Case in which a Parking Compartment is Separated by U-Shaped WhiteLines)

In the above embodiment, a case in which the parking compartments L areseparated by one white line has been described. However, a parkingcompartment recognition apparatus 1 may detect a parking compartment Lset by U-shaped white lines.

FIG. 21 illustrates detection of the parking compartment L set byU-shaped white lines. In FIG. 21, a size of each of the white lines isexaggeratingly shown in an enlarged manner. With reference to FIG. 21, aparking compartment L5 is separated by a white line W5 and a white lineW6, each having a U-shape.

The white line W5 includes a white line W5 a and a white line W5 b. Thewhite line W5 a is parallel to the white line W5 b. A dark region W5 cis a region between the white line W5 a and the white line W5 b, inwhich asphalt is exposed. The white line W6 includes a white line W6 aand a white line W6 b. The white line W6 a is parallel to the white lineW6 b. A dark region W6 c is a region between the white line W6 a and thewhite line W6 b, in which asphalt is exposed.

A border-line detector 211, as described above, detects positive edgelines CP5 a, CP5 b, CP6 a and CP6 b and detects negative edge lines CM5a, CM5 b, CM6 a and CM6 b. The positive edge line CP5 a and the negativeedge line CM5 a form a part of an outline of the white line W5 a. Thepositive edge line CP5 b and the negative edge line CM5 b form a part ofan outline of the white line W5 b. The positive edge line CP6 a and thenegative edge line CM6 a form a part of an outline of the white line W6a. The positive edge line CP6 b and the negative edge line CM6 b form apart of an outline of the white line W6 b.

A compartment determiner 212 generates a pair in the above describedmethod, and calculates a distance between two edge lines constitutingthe generated pair. Specifically, the compartment determiner 212identifies the positive edge line CP5 a and the negative edge line CM5 bas a candidate pair. A region between the positive edge line CP5 a andthe negative edge line CM5 b is the dark region W5 c.

However, a width of the dark region W5 c is much smaller than a width ofthe parking compartment L5. Thus, a distance between the positive edgeline CP5 a and the negative edge line CM5 b is outside a predeterminedrange corresponding to a width of the parking compartment. Therefore,the compartment determiner 212 does not detect the dark region W5 c asthe parking compartment L. Similarly, the dark region W6 c of the whiteline W6 is not detected as the parking compartment L.

The compartment determiner 212 generates a pair including the positiveedge line CP5 b and the negative edge line CM6 a and determines that adistance between two edge lines constituting this pair is within thepredetermined range corresponding to the width of the parkingcompartment. That is, the compartment determiner 212 detects the parkingcompartment L5 based on the positive edge line CP5 b and the negativeedge line CM6 a.

(Case in which Parking Compartment is Oblique to Traveling Road)

FIG. 22 illustrates detection of the parking compartment L obliquely setto a traveling road A. In FIG. 22, a size of each of the white lines isexaggeratingly shown in an enlarged manner. With reference to FIG. 22, aparking compartment L7 is set by white lines W7 and W8. An angle that isformed by the traveling road A and the parking compartment L7 is, forexample, 45°. That is, the parking compartment L7 is a parallelogram.Even when the parking compartment L7 is obliquely set to the travelingroad A, a parking compartment detector 15 can detect the parkingcompartment L7 in the above described method. Description will behereinafter described in detail.

The compartment determiner 212 detects the parking compartment L7 basedon a positive edge line CP7 and a negative edge line CM8 by using theabove same method.

The compartment determiner 212 determines a parking reference positionS7 of the parking compartment L7. Specifically, the compartmentdeterminer 212 identifies a line segment E7 connecting a starting pointof the positive edge line CP7 and a starting point of the negative edgeline CM8. The compartment determiner 212 determines a linear line thatpasses through a midpoint M7 of the identified line segment E7 and isparallel to one of the positive edge line CP7 and the negative edge lineCM8 to be the center line K7 of the parking compartment L7. Thecompartment determiner 212 determines a point that exists on the centerline K7 located within the parking compartment L7 and exists at aposition a length Lg away from the midpoint M7 to be the parkingreference position S7 of the parking compartment L7.

FIG. 23 illustrates another determination method of a parking referenceposition in the parking compartment L7. In FIG. 23, a size of each ofthe white lines is exaggeratingly shown in an enlarged manner. Thecompartment determiner 212 generates a linear line VL that is orthogonalto an extended line CE obtained by extending the negative edge line CM8and passes through the starting point of the positive edge line CP7. Avirtual starting point VP is an intersection between the linear line VLand the extended line CE. The compartment determiner 212 identifies amidpoint M7′ of a line segment E7′ connecting the virtual starting pointVP and the starting point of the positive edge line CP7.

The compartment determiner 212 generates the center line K7 that passesthrough a midpoint M7′ and is parallel to one of the positive edge lineCP7 and the negative edge line CM8. The compartment determiner 212determines a point that exists on the center line K7 located within theparking compartment L7 and exists at a position a length Lg away fromthe midpoint M7′ to be the parking reference position S7 of the parkingcompartment L7.

When identifying the midpoint M7′, the compartment determiner 212 maygenerate a line that passes through the starting point of the negativeedge line CM8 and is orthogonal to the negative edge line CM8 as thelinear line VL. In this case, the midpoint M7′ exists within the parkingcompartment L7.

Other Modification

In the above embodiment, a case in which the driver of the vehicle 9performs an instruction to start parking and selection of the parkingcompartment L has been described. However, the invention is not limitedthereto. Even when performing all parking control including theselection of a parking compartment to park the vehicle 9 and parking ofthe vehicle 9 to the selected parking compartment, the vehiclecontroller 2 may also use detection results of the parking compartment Lby the parking compartment recognition apparatus 1.

In the above embodiment, a case in which the detection setter 12acquires the rotation angle of the steering wheel as the traveling stateof the vehicle 9 has been described. However, the invention is notlimited thereto. The detection setter 12 may also determine whether ornot the vehicle 9 turns based on a rotation angle of a steered wheel ofthe vehicle 9. That is, the detection setter 12 may select the camerasand determine the detection mode based on a steering angle of thevehicle 9.

In the above embodiment, a case in which the detection setter 12 selectsthe cameras to be used for detecting the parking compartment L anddetermines the detection mode based on the speed of the vehicle 9, therotation angle of the steering wheel and the position of the vehicle 9has been described. However, the invention is not limited thereto. Thedetection setter 12 may select the cameras to be used for detecting theparking compartment L and determine the detection mode based on thetraveling state of the vehicle 9. For example, acceleration of thevehicle 9 may be used as the traveling state of the vehicle 9.

In the above embodiment, a case in which the detection setter 12executes both the selection of the cameras and determination of thedetection mode has been described. However, the invention is not limitedthereto. The detection setter 12 may also execute either the selectionof the cameras or the determination of the detection mode.

In the above embodiment, a case in which the detection setter 12 selectstwo cameras from four cameras 3 has been described. However, theinvention is not limited thereto. The detection setter 12 may select thecameras less in number than the cameras mounted on the vehicle 9. Forexample, when the parking compartment detector 15 includes a thirddetector (not shown) besides the first detector 21 and the seconddetector 22, the parking compartment detector 15 can execute threeprocesses for detecting the parking compartment from the images inparallel. In this case, the detection setter 12 may select threecameras.

In the above embodiment, a case in which the detection area specifyingpart 14 specifies the detection area based on the detection modedetermined by the detection setter 12 has been described. However, theinvention is not limited thereto. The parking compartment recognitionapparatus 1 does not have to include the detection area specifying part14. In this case, the detection area is common between the simple modeand the detailed mode.

In the above embodiment, a case in which the parking compartmentrecognition apparatus 1 executes both the selection of the cameras andthe determination of the detection mode has been described. However, theinvention is not limited thereto. The parking compartment recognitionapparatus 1 may also execute either the selection of the cameras or thedetermination of the detection mode. When the parking compartmentrecognition apparatus 1 determines the detection mode and does notselect the cameras, at least one camera may be mounted on the vehicle 9.

In the above embodiment, a case in which the parking compartmentdetector 15 does not identify a depth of the detected parkingcompartment L has been described. However, the invention is not limitedthereto. When the parking compartment detector 15 has detected twoborder lines B constituting the parking compartment L, the parkingcompartment detector 15 may assume that the parking compartment L isquadrangular and determine four vertices specifying the parkingcompartment L. For example, the parking compartment detector 15determines starting points of the two border lines B constituting theparking compartment L to be two vertices of the four verticesconstituting a quadrangle. The parking compartment detector 15determines two points a predetermined distance away from each of thestarting points of the two border lines B to be remaining vertices ofthe four vertices. In this case, the parking compartment detector 15 mayrecord the four vertices specifying the parking compartment L in thecompartment list.

In the above embodiment, the parking compartment detector 15 may alsodetermine whether or not another vehicle is parked in the detectedparking compartment L. For example, the parking compartment detector 15may detect whether or not another vehicle is parked in the detectedparking compartment L based on detection results of the distancemeasuring sensor. Alternatively, the parking compartment detector 15 maypreviously store characteristics of the vehicle and perform an imagerecognition process based on the stored characteristics of the vehicle.In any case, the parking compartment detector 15 may determine whetheror not another vehicle is parked in the detected parking compartment Lbased on a position relation between the detected another vehicle andthe detected parking compartment L.

In the above embodiment, the parking compartment detector 15 may alsodetermine whether or not another vehicle is parked. For example, theparking compartment detector 15 may detect whether or not anothervehicle is parked in the detected parking compartment L based ondetection results of the distance measuring sensor. Alternatively, theparking compartment detector 15 may previously store characteristics ofthe vehicle and perform an image recognition process based on the storedcharacteristics of the vehicle. In any case, the parking compartmentdetector 15 may determine whether or not another vehicle is parked inthe detected parking compartment L based on a position relation betweenthe detected another vehicle and the detected parking compartment L.

In the above embodiment, a case in which when the parking compartmentdetector 15 detects the parking compartment L, the parking referenceposition and two starting points of two border lines B are recorded inthe compartment list 18 has been described. However, the invention isnot limited thereto. The parking compartment detector 15 does not haveto record the two starting points of the two border lines B in thecompartment list 18. That is, the parking compartment detector 15 maydetect the parking reference position S as a reference to determinewhether or not parking of the vehicle 9 has been completed when parkingthe vehicle 9 from the images acquired by the cameras 3. The parkingcompartment recognition apparatus 1 operates as a parking positionrecognition apparatus that detects the parking reference position S fromthe frames captured by the selected cameras. In this case, descriptionof the parking compartment in each functional block of the parkingcompartment recognition apparatus 1 described in the above embodimentmay be replaced with description of the parking reference position S.

In the above embodiment, a case in which the detection setter 12determines the detailed mode and the simple mode has been described.However, the invention is not limited thereto. The detection setter 12may determine a first mode and a second mode that have differentdetection conditions of the parking compartment based on the travelingstate of the vehicle 9. When the first mode is selected, the parkingcompartment detector 15 may detect the parking compartment from theframes generated by the selected cameras in a first predeterminedcondition. When the second mode is selected, the parking compartmentdetector 15 may detect the parking compartment from the frames generatedby the selected cameras in a second condition different from the firstcondition. Even in this case, since the processing contents of detectingthe parking compartment can be changed based on the traveling state ofthe vehicle 9, the load for detecting the parking compartment can bereduced.

In the image processing apparatus described in the above embodiment,each functional block may be individually integrated into a single chipby a semiconductor device, such as an LSI. Alternatively, a part or allof the functional blocks may be integrated into a single chip. Althoughthe semiconductor device is the LSI here, but the semiconductor deviceis also referred to an IC, a system LSI, a super LSI and an ultra LSIdepending on an integration degree.

A circuit integration method is not limited to the LSI, and may berealized by a dedicated circuit or a general-purpose processor. Aftermanufacturing the LSI, the FPGA or a configurable processor may be used.

Each functional block process of the above each embodiment may bepartially or completely implemented by a program. Each functional blockprocess of the above each embodiment is partially or completelyperformed by a central processing unit (CPU) in a computer. The programfor performing each process is stored in a storage device, such as ahard disk or a ROM, and is read from the ROM to the RAM and executed.

Each process of the above each embodiment may be implemented by hardwareor software (including an operation system (OS), middleware or casesthat are implemented with a predetermined library). Furthermore, eachprocess of the above each embodiment may be implemented by both softwareand hardware.

For example, when each functional block of the above embodiments(including modifications) is implemented by software, each functionalpart may be implemented by a software process by using the hardware towhich the CPU, the ROM, the RAM, an input part, an output part, and thelike, are connected by a bus.

An execution order of a process method in the above embodiments is notnecessarily limited to description of the above embodiments, and theexecution order can be changed without departing from the scope of theinvention.

A computer program causing a computer to execute the above describedmethod and a computer-readable recording medium recording the programare included in the scope of the invention. Here, examples of thecomputer-readable recording medium include a flexible disk, a hard disk,a CD-ROM, an MO, a DVD, a DVD-ROM, a DVD-RAM, a high-capacity DVD, anext-generation DVD and a semiconductor memory.

The computer program is not limited to the program recorded in the aboverecording medium, and may be transmitted through an electroniccommunication line, wireless or wire communication line, a network, etc.represented by the Internet.

Heretofore, the embodiments of the invention have been described.However, the embodiments described above are merely examples forimplementing the invention. Thus, the invention is not limited to theembodiments described above, and can be appropriately modified andimplemented without departing from the gist of the invention.

[Additional Statement]

A parking compartment recognition apparatus may be configured by thefollowing first to ninth configurations.

In the first configuration, the parking compartment recognitionapparatus includes an image acquisition part, a detection setter and aparking compartment detector. The image acquisition part acquires aplurality of images from a plurality of cameras to be mounted on avehicle. The detection setter selects the cameras to be used fordetecting a parking compartment from among the plurality of camerasbased on a traveling state of the vehicle. The parking compartmentdetector acquires the images generated by the selected cameras from theimage acquisition part, and detects the parking compartment from theacquired images.

According to the first configuration, since the images to be used fordetecting the parking compartment are changed according to the travelingstate of the vehicle, a load for detecting the parking compartment canbe reduced.

The second configuration is the first configuration, wherein the numberof the selected cameras is smaller than the number of the plurality ofcameras.

According to the second configuration, even when the parking compartmentdetector cannot simultaneously detect the parking compartment from theplurality of images generated by the plurality of cameras, the parkingcompartment can be detected.

The third configuration is the second configuration, wherein thedetection setter selects the cameras to be used based on a speed of thevehicle.

According to the third configuration, the images to be used fordetecting the parking compartment are changed according to the speed ofthe vehicle.

The fourth configuration is the first or second configuration, whereinthe detection setter selects the cameras to be used based on a rotationangle of a steering wheel of the vehicle or an angle of a steered wheelof the vehicle.

According to the fourth configuration, the images to be used fordetecting the parking compartment are changed based on the angles of thesteering wheel or the steered wheel.

The fifth configuration is one of the second to fourth configurations,wherein the detection setter selects a first to a third cameras, assignsthe first camera and the second camera to a first detector and assignsthe third camera to a second detector. The parking compartment detectorincludes the first detector and the second detector. The first detectoralternately repeats a process for detecting the parking compartment fromthe images generated by the first camera and the process for detectingthe parking compartment from the images generated by the second camera.The second detector detects a parking area from the images generated bythe third camera.

According to the fifth configuration, the first detector alternatelyswitches among the cameras to be used for detecting the parkingcompartment. As a result, it is possible to select the cameras more innumber than the detectors.

The sixth configuration is the fifth configuration, wherein theplurality of cameras includes a left side camera and a right sidecamera. The left side camera captures a left side view of the vehicle.The right side camera captures a right side view of the vehicle. Whenthe speed of the vehicle is greater than a first predetermined referencevalue and the vehicle is moving forward, the detection setter selectsthe left side camera and the right side camera.

According to the sixth configuration, when the vehicle is traveling on atraveling road in a parking lot, the left side camera and the right sidecamera can detect more parking compartments L than a front camera and arear camera. When the speed of the vehicle is greater than the firstreference value, the detection setter selects the left side camera andthe right side camera so as to detect more parking compartments.

The seventh configuration is the fifth configuration or the sixthconfiguration, wherein the parking compartment detector includes thefirst detector and the second detector. The plurality of camerasincludes the left side camera, the right side camera and the rearcamera. The left side camera captures the left side view of the vehicle.The right side camera captures the right side view of the vehicle. Therear camera captures a rear view of the vehicle. When the speed of thevehicle is within a predetermined speed range and a steering angle ofthe vehicle is smaller than a predetermined angle, the detection setterassigns the left side camera and the right side camera to the firstdetector and assigns the rear camera to the second detector. When thespeed of the vehicle is within a predetermined speed range and thesteering angle is equal to or greater than the predetermined angle, thedetection setter assigns the camera that is located outside a turningtrack of the vehicle among the left side camera and the right sidecamera to the first detector, and assigns the rear camera to the seconddetector. The first detector and the second detector respectively detectthe parking compartment from the frames generated by the camerasassigned by the detection setter.

According to the seventh configuration, it is possible to detect theparking compartment in which the vehicle 9 is most likely to be parked.

The eighth configuration is one of the fifth to seventh configurations,wherein the plurality of cameras includes the left side camera, theright side camera and the rear camera. The left side camera captures theleft side view of the vehicle. The right side camera captures the rightside view of the vehicle. The rear camera captures the rear view of thevehicle. When the vehicle is moving backward and is located outside theparking compartment, the detection setter selects the rear camera. Whenthe vehicle is moving backward and is located within the parkingcompartment, the detection setter selects the left side camera and theright side camera.

According to the eighth configuration, when the vehicle is movingbackward and is located outside the parking compartment, the rear camerais selected. As a result, the parking compartment to park the vehiclecan be detected with a high accuracy. When the vehicle is movingbackward and is located within the parking compartment, the left sidecamera and the right side camera area selected. As a result, it ispossible to capture an image of an entire white line that specifies theparking compartment, so that this parking compartment can be detected.

In the ninth configuration, a parking position recognition apparatusincludes an image acquisition part, a detection setter and a referenceposition detector. The image acquisition part acquires a plurality ofimages from a plurality of cameras to be mounted on a vehicle. Thedetection setter selects the cameras to be used for detecting a parkingreference position from among the plurality of cameras based on atraveling state of the vehicle. The reference position detector acquiresthe images generated by the selected cameras from the image acquisitionpart, and detects the parking reference position from the acquiredimages.

According to the ninth configuration, since the images to be used fordetecting the parking reference position are changed according to thetraveling state of the vehicle, a load for detecting the parkingreference position can be reduced.

A parking compartment recognition method to be used in a parkingcompartment recognition apparatus 1 may include the following step (a),step (b) and step (c). The step (a) acquires a plurality of images froma plurality of cameras to be mounted on a vehicle. The step (b) selectsthe cameras to be used for detecting a parking compartment from amongthe plurality of cameras based on a traveling state of the vehicle. Thestep (c) selects the images generated by the selected cameras from amongthe acquired images, and detects the parking compartment from theselected images.

The parking compartment recognition apparatus 1 may be configured by thefollowing tenth to eighteenth configurations.

In the tenth configuration, a parking compartment recognition apparatusrecognizes a parking compartment by using images generated by at leastone camera to be mounted on a vehicle. The parking compartmentrecognition apparatus includes an image acquisition part, a detectionsetter and a parking compartment detector. The image acquisition partacquires the images from at least one camera. The detection setterselects a detection mode for detecting the parking compartment from theacquired images from among a first mode and a second mode based on atraveling state of the vehicle. When the detection setter selects thefirst mode, the parking compartment detector detects the parkingcompartment from the acquired images in a first predetermined condition.When the detection setter selects the second mode, the parkingcompartment detector detects the parking compartment from the acquiredimages in a second condition different from the first condition.

According to the tenth configuration, since the detection mode ischanged based on the traveling state of the vehicle. Therefore, it ispossible to reduce a processing load for detecting the parkingcompartment without lowering detection accuracy of the parkingcompartment.

The eleventh configuration is the tenth configuration, wherein theparking compartment detector includes a detection area specifying part.When the detection setter selects the first mode, the detection areaspecifying part specifies a predetermined detection area in the acquiredimages. When the detection setter selects the second mode, the detectionarea specifying part specifies a detection area based on the alreadydetected parking compartment. The parking compartment detector detectsthe parking compartment from the detection area specified by theacquired images.

According to the eleventh configuration, when the second mode isselected, the detection area is detected based on the already detectedparking compartment, so that the parking compartment can be immediatelydetected.

The twelfth configuration is the tenth or eleventh configuration,wherein the parking compartment detector includes a border-line detectorand a compartment determiner. The border-line detector selects attentionpixels in the acquired images and determines whether or not an edge isformed by the attention pixels so as to detect a border line that is atleast a part of an outline of a compartment line showing a range of theparking compartment. The compartment determiner determines the parkingcompartment based on the detected border line. A selection interval ofthe attention pixels in a case where the second mode is selected isnarrower than the selection interval of the attention pixels in a casewhere the first mode is selected.

According to the twelfth configuration, when the second mode isselected, the parking compartment can be detected with a higher accuracythan when the first mode is detected.

The thirteenth configuration is the twelfth configuration, wherein thedetection area that is specified when the first mode is selected iswider than the detection area that is specified when the second mode isselected.

According to the thirteenth configuration, the detection area that isspecified when the first mode is selected is wider than the detectionarea that is specified when the second mode is selected. Therefore, itis possible to detect the parking compartment from a wide area.Different from when the second mode is selected, when the first mode isselected, a new parking compartment can be detected.

The fourteenth configuration is the eleventh configuration, wherein theborder-line detector detects two border lines of the compartment lineextending in a long-side direction. When the two border lines areparallel and a distance between the two border lines is within apredetermined range, the compartment determiner determines that theparking compartment has been detected based on the two border lines.

According to the fourteenth configuration, the parking compartment isdetected based on a position relation between the detected two borderlines. Since lengths of the two border lines do not have to be used fordetecting the parking compartment, even when a part of the white line ishidden by an obstacle, the parking compartment can be detected. Forexample, the parking compartment in which another vehicle has beenalready parked can be detected

The fifteenth configuration is the tenth configuration, wherein when thefirst mode is selected, the parking compartment detector detects theborder line that is at least a part of the outline of the compartmentline separating the parking compartments from the images with apredetermined accuracy, and determines the parking reference positionbased on the detected border line. When the second mode is selected, theparking compartment detector specifies the detection area based on thealready detected parking reference position, detects the border linefrom the detection area with a higher accuracy than the predeterminedaccuracy, and determines the parking reference position based on thedetected border line. The parking reference position is a referenceposition for stopping the vehicle within the parking compartment.

According to the fifteenth configuration, when the second mode isselected, the parking compartment detector specifies the detection areabased on the already detected parking reference position, and determinesthe parking reference position based on the border line detected formthe detection area. As a result, it is possible to determine the parkingreference position of the parking compartment detected in the first modewith a further higher accuracy.

The sixteenth configuration is the tenth configuration, wherein thedetection setter selects the detection mode based on at least one of thespeed of the vehicle, the steering angle of the vehicle and a positionof the vehicle.

According to the sixteenth configuration, the detection mode can beimmediately changed according to a change in the traveling state of thevehicle.

In the seventeenth configuration, a parking position recognitionapparatus recognizes a parking reference position by using imagesgenerated by at least one camera to be mounted on a vehicle. The parkingposition recognition apparatus includes an image acquisition part, adetection setter and a reference position detector. The imageacquisition part acquires the images from at least one camera. Thedetection setter selects a detection mode for detecting the parkingreference position from the acquired images from among a first mode anda second mode based on the traveling state of the vehicle. When thedetection setter selects the first mode, the reference position detectordetects the parking reference position from the acquired images in afirst predetermined condition. When the detection setter selects thesecond mode, the reference position detector detects the parkingreference position from the acquired images in a second conditiondifferent from the first condition.

According to the seventeenth configuration, the detection mode ischanged based on the traveling state of the vehicle. Therefore, it ispossible to reduce a processing load for detecting the parking referenceposition without lowering detection accuracy of the parking referenceposition.

A parking compartment recognition apparatus according to the eighteenthconfiguration may execute a parking compartment recognition methodincluding a step (a), a step (b) and a step (c). The step (a) acquiresimages from at least one camera. The step (b) selects a detection modefor detecting a parking compartment from the acquired images from amonga first mode and a second mode based on a traveling state of a vehicle.When the first mode is selected, the step (c) detects the parkingcompartment from the images acquired in a first predetermined condition.When the second mode is selected, the step (c) detects the parkingcompartment from the images acquired in a second condition differentfrom the first condition.

While the invention has been shown and described in detail, theforegoing description is in all aspects illustrative and notrestrictive. It is therefore understood that numerous othermodifications and variations can be devised without departing from thescope of the invention.

What is claimed is:
 1. A parking space recognition apparatus thatrecognizes a parking space, the apparatus comprising: an imageacquisition part that acquires a plurality of images generated by aplurality of cameras provided on a vehicle including (i) a left sidecamera capturing a left side view of the vehicle, (ii) a right sidecamera capturing a right side view of the vehicle and (iii) a rearcamera capturing a rear view of the vehicle; a detection setter thatselects the cameras to be used for detecting the parking space fromamong the plurality of cameras based on a traveling state of thevehicle, and selects a detection mode for detecting the parking spacefrom the images generated by the selected cameras from among a firstmode and a second mode based on the traveling state of the vehicle; adetection area specifying part that specifies a first predetermineddetection area in the images generated by the selected cameras among theplurality of images acquired by the image acquisition part when thedetection setter selects the first mode, and specifies a seconddetection area narrower than the first detection area in the imagesgenerated by the selected cameras when the detection setter selects thesecond mode; and a parking space detector that detects the parking spacefrom the first detection area specified by the detection area specifyingpart with a first accuracy when the detection setter selects the firstmode, and detects the parking space from the second detection areaspecified by the detection area specifying part with a second accuracywhen the detection setter selects the second mode.
 2. The parking spacerecognition apparatus according to claim 1, wherein the parking spacedetector includes a first detector and a second detector, the detectionsetter assigns one or more of the cameras among the plurality of camerasto each of the first detector and the second detector, and the firstdetector and the second detector detect the parking space temporally inparallel.
 3. The parking space recognition apparatus according to claim2, wherein the detection setter assigns the left side camera and theright side camera to the first detector and assigns the rear camera tothe second detector, the first detector alternately repeats a processfor detecting the parking space from the images generated by the leftside camera and the process for detecting the parking space from theimages generated by the right side camera, and the second detectordetects the parking space from the images generated by the rear camera.4. The parking space recognition apparatus according to claim 2, whereinwhen a speed of the vehicle is within a predetermined speed range and asteering angle of the vehicle is smaller than a predetermined angle, thedetection setter assigns the left side camera and the right side camerato the first detector and assigns the rear camera to the seconddetector, when the speed of the vehicle is within the predeterminedspeed range and the steering angle is equal to or greater than thepredetermined angle, the detection setter assigns one of the camerasthat is located outside a turning track of the vehicle among the leftside camera and the right side camera to the first detector, and assignsthe rear camera to the second detector, and the first detector and thesecond detector respectively detect the parking space from the imagesgenerated by the cameras assigned by the detection setter.
 5. Theparking space recognition apparatus according to claim 1, wherein theparking space detector includes (i) a border-line detector that selectsattention pixels in the first detection area and the second detectionarea and determines whether or not an edge is formed by the selectedattention pixels so as to detect a border line that is at least a partof an outline of a parking space line showing a range of the parkingspace, and (ii) a parking space determiner that determines the parkingspace based on the detected border line, and a selection interval of theattention pixels in a case where the second mode is selected is narrowerthan the selection interval of the attention pixels in a case where thefirst mode is selected.
 6. The parking space recognition apparatusaccording to claim 1, wherein when the first mode is selected, theparking space detector detects a border line that is at least a part ofan outline of a parking space line showing a range of the parking spacefrom the images with the first accuracy, and determines a parkingreference position based on the detected border line; when the secondmode is selected, the detection area specifying part specifies thesecond detection area based on end points of the already detected borderline; when the second mode is selected, the parking space detectordetects the border line from the second detection area specified by thedetection area specifying part with the second accuracy, and determinesthe parking reference position based on the detected border line; andthe parking reference position is a reference position for stopping thevehicle within the parking space.
 7. A parking space recognition methodfor recognizing a parking space; the method comprising the steps of: (a)acquiring a plurality of images generated by a plurality of camerasprovided on a vehicle including (i) a left side camera capturing a leftside view of the vehicle, (ii) a right side camera capturing a rightside view of the vehicle and (iii) a rear camera capturing a rear viewof the vehicle; (b) selecting the cameras to be used for detecting theparking space from among the plurality of cameras based on a travelingstate of the vehicle, and selecting a detection mode for detecting theparking space from the images generated by the selected cameras fromamong a first mode and a second mode based on the traveling state of thevehicle; (c) specifying a first predetermined detection area in theimages generated by the selected cameras among the plurality of acquiredimages when the first mode is selected, and specifying a seconddetection area narrower than the first detection area in the imagesgenerated by the selected cameras when the second mode is selected; and(d) detecting the parking space from the first specified detection areawith a first accuracy when the first mode is selected, and detecting theparking space from the second specified detection area with a secondaccuracy when the second mode is selected.
 8. A parking spacerecognition apparatus that recognizes a parking space; the apparatuscomprising a processor programmed to: (a) acquire a plurality of imagesgenerated by a plurality of cameras provided on a vehicle including (i)a left side camera capturing a left side view of the vehicle, (ii) aright side camera capturing a right side view of the vehicle and (iii) arear camera capturing a rear view of the vehicle; (b) select the camerasto be used for detecting the parking space from among the plurality ofcameras based on a traveling state of the vehicle, and select adetection mode for detecting the parking space from the images generatedby the selected cameras from among a first mode and a second mode basedon the traveling state of the vehicle; (c) specify a first predetermineddetection area in the images generated by the selected cameras among theplurality of acquired images when the first mode is selected, andspecifying a second detection area narrower than the first detectionarea in the images generated by the selected cameras when the secondmode is selected; and (d) detect the parking space from the firstspecified detection area with a first accuracy when the first mode isselected, and detect the parking space from the second specifieddetection area with a second accuracy when the second mode is selected.